Closed T-Damer closed 1 month ago
Ok, the fix is: use @tonconnect/ui-react
(obvious, I know, but I used @tonconnect/ui
with event listeners, which didn't work, because it has no context and maybe wasn't intended to be used in TMA, I don't know), you should wrap your app high enough (I tried wrapping inside 1 route, which led to this issue. I moved the wrapper higher and deeplinking worked). I also used patched version for preact
from this PR (I used locally built version)
Describe the bug
When trying to connect any 3rd party wallet via
@tonconnect/ui
or@tonconnect/ui-react
on Android it leads to deeplinking issue (ERR_UNKNOWN_URL_SCHEME). I noticed that other apps don't suffer from this problem. Hers' the demo:https://github.com/user-attachments/assets/00d14bce-c00c-4195-9195-bb2681f813d8
Basically I initialize the library and try to connect the wallet:
I have Tonkeeper and MyTonWallet installed on my system, when using Tonkeeper built-in browser, everything works fine
Expected behavior
It should immediately open the external app and suggest to connect, it shouldn't lead
Current behavior
It open webpage of the wallet which tries to open the external wallet and falls into
ERR_UNKNOWN_URL_SCHEME
Steps to Reproduce
Environment
scalr-frontend@1.0.0 /Users/Damer/Projects/scalr/scalr-frontend └─┬ @tonconnect/ui@2.0.9 └─┬ @tonconnect/sdk@3.0.5 ├── @tonconnect/isomorphic-eventsource@0.0.2 ├── @tonconnect/isomorphic-fetch@0.0.3 └── @tonconnect/protocol@2.2.6
Android specific Tested on latest WebView engine, Android 14, I have reports from users with older system versions (11-13)
Additional context
No response