Comments (5)
Hi @shaharyakir , thanks for your question. You shouldn't can use useTonConnectUI
for onStatusChange
subscriptions. This hook is only designed for actions calls like sendTransaction
, or TonConnectUI configuration changing.
If you need to get actual wallet, you should use useTonWallet
https://github.com/ton-connect/sdk/tree/main/packages/ui-react#usetonwallet
from sdk.
- perhaps it shouldn't return wallet details then to avoid confusion?
- How should you use
onStatusChange
when sending a transaction? (i.e. you wouldn't expect the wallet to disconnect while you're sending it etc.)
from sdk.
When you use tonconnect/ui-react you should not use onStatusChange
at all. To send a transaction you can use just const result = await tonConnectUI.sendTransaction(transaction)
. When user approves the transaction it the wallet, the promise will resolve. See details
from sdk.
In that case, I'd suggest to avoid returning wallet details and the onStatusChange event handler from the useTonConnectUI hook (if you're not supposed to use them all they do is create confusion).
from sdk.
Same confusion was in our team
from sdk.
Related Issues (20)
- [UI-REACT]: Telegram Wallet freeze on loading when moving from Web App HOT 4
- [UI]: Wallets Order HOT 2
- SDK: Adding support for Metamask Snap in Ton-Connect SDK
- UI-REACT: Confirm transaction modal auto closing in Tonkeeper browser HOT 2
- UI-REACT: Can't restore connection after calling tonConnectUI.disconnect() method
- Error: (0 , react__WEBPACK_IMPORTED_MODULE_0__.createContext) is not a function HOT 3
- [UI]: How to catch the `TON_CONNECT_SDK_ERROR` error? HOT 5
- [UI-REACT]: Decryption error HOT 17
- [<SDK or UI or UI-REACT or PROTOCOL>]: <brief description of your question>
- Connect from wallet address
- [SDK]: SignData Feature
- [<SDK or UI or UI-REACT or PROTOCOL>]: <brief description> HOT 1
- UI-React : error with TonConnectButton HOT 2
- [<UI-REACT>]: React 19 + Next 15 HOT 1
- [UI-REACT]: Send USDT follow official docs not work
- [UI] question in nuxt 3
- [<SDK>]: <windowKeys filter would never work>
- [<SDK or UI>]:Get boc by "tonConnectUI?.sendTransaction(transaction)" can not parser HOT 2
- [UI-REACT]: Can't connect on Desktop HOT 3
- [TONCONNECT-UI]: Decryption Error. HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdk.