diff --git a/app/api/routes/_blockchain.py b/app/api/routes/_blockchain.py index d5d4b63..3429a44 100644 --- a/app/api/routes/_blockchain.py +++ b/app/api/routes/_blockchain.py @@ -95,7 +95,7 @@ async def s_api_v1_blockchain_send_new_content_message(request): return response.json({ 'address': platform.address.to_string(1, 1, 1), 'amount': str(int(0.15 * 10 ** 9)), - 'payload': ( + 'payload': b64encode( begin_cell() .store_uint(0x5491d08c, 32) .store_uint(int.from_bytes(encrypted_content_cid.content_hash, "big", signed=False), 256) @@ -129,7 +129,7 @@ async def s_api_v1_blockchain_send_new_content_message(request): .end_cell() ) .end_cell().to_boc(False) - ).hex() + ).decode() }) except BaseException as e: make_log("Blockchain", f"Error while sending new content message: {e}" + '\n' + traceback.format_exc(), level='error') @@ -155,7 +155,7 @@ async def s_api_v1_blockchain_send_purchase_content_message(request): return response.json({ 'address': request.json['content_address'], 'amount': str(int(licenses_cost['resale']['price'])), - 'payload': ( + 'payload': b64encode(( begin_cell() .store_uint(0x2a319593, 32) .store_uint(0, 64) @@ -166,5 +166,5 @@ async def s_api_v1_blockchain_send_purchase_content_message(request): # }[request.json['license_type']], 8) .store_uint(0, 256) .end_cell() - ).to_boc(False).hex() + ).to_boc(False)).decode() })