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

[UI]: <@2.0.1 & @2.0.2 Vanilla JS tonConnectUI.connected does't work> #158

Open carzygod opened 2 months ago

carzygod commented 2 months ago

Describe the bug

When using @2.0.1 & @2.0.2 release of Vanilla JS version . tonConnectUI.connected & tonConnectUI.state not working right .

For example :

if(tonConnectUI.connected)
{
    console.log("Disconnect for connection reload")
    await tonConnectUI.disconnect();
}
await tonConnectUI.openModal();

While processing this logic . it saids : image

But if i change the logic to :

await tonConnectUI.disconnect();
await tonConnectUI.openModal();

image The tonconnectUI.modalstate shows

{status: 'closed', closeReason: null}

, which i think , yes , not been connected .

This issues happened since @2.0.1 . Afther we meet this issues , we rollback to @2.0.0 which still works fine with right result .

Expected behavior

Find the issues and fix in future release version .

Current behavior

@2.0.0 working , but @2.0.1 & @2.0.2 Not working .

Steps to Reproduce

Run the code in Vanilla JS

Environment

Vanilla JS

Additional context

No response