ton-connect / sdk

SDK for TON Connect 2.0 — a comprehensive communication protocol between wallets and apps in TON ecosystem
Apache License 2.0
165 stars 40 forks source link

@tonconnect/ui: Can't connect wallet after .disconnect() #175

Open moltea opened 4 weeks ago

moltea commented 4 weeks ago

Describe the bug

Can't reconnect wallet normally after tonConnectUI.disconnect(); (Works great in 2.0.2, doesn't work in latest)

Expected behavior

The wallet connects the first time and transactions are sent successfully.

Current behavior

After steps in "Steps to Reproduce" I get:

solid.js:894 Uncaught (in promise) Error: Unknown error
    at Wt (solid.js:894:10)
    at jt (solid.js:900:9)
    at solid.js:653:5
    at Lt (solid.js:623:18)
    at Ot (solid.js:725:7)
    at Pt (solid.js:823:36)
    at solid.js:792:34
    at Mt (solid.js:741:17)
    at solid.js:792:17
    at Mt (solid.js:742:5)

(tonConnectUI.wallet changes to real wallet, but modal doesn't close, events are not fired, and etc.) The wallet does not connect, the qr code remains. If I scan the qr code a second time, the wallet seems to be linked, but when I try to send the transaction via sendTransaction, it simply does not appear in the wallet (tonkeeper and etc).

Steps to Reproduce

Connected tonkeeper wallet (or any other available wallet) via connectWallet method Used tonConnectUI.disconnect(); Trying to connect wallet again, and scan the qr-code.

Environment

latest tonconnect/ui from unpkg OS: any Browser: any

Additional context

If i call connectWallet(), then i reload the page and call connectWallet() again, then everything will be fine, the wallet will be linked the first time and transactions will be sent.