XaBbl4 / pytonconnect

Python SDK for TON Connect 2.0
Apache License 2.0
53 stars 16 forks source link

Intermittent Issue with send_transaction Function Not Returning Values #15

Open LILBachok opened 2 months ago

LILBachok commented 2 months ago

I am encountering an intermittent issue with the send_transaction function. During testing, the function sometimes fails to return any value. This inconsistency makes it challenging to handle transaction results reliably.

LILBachok commented 2 months ago

I have tried https://t.me/ton_connect_example_bot and https://t.me/test_tonconnect_bot Here is the same problem that i have forced with - after aproving a transaction in mini app bots don't send anything image

alxkvx commented 2 months ago

looks like it is a bug not properly handling storage values after reconnect = .restore_connection():

connector = TonConnect(MANIFEST_URL, storage=TcStorage(chat_id=message.from_user.id))
connected = await connector.restore_connection()

if run .send_transaction(transaction) within the same function where initial connection was done, then it returns callback BOC properly. it is not a workaround as you need every time reconnect wallet to send transaction. this should be fixed in the code.