Comments (4)
Is this not possible, because the extension itself uses sync
instead of block
? : https://github.com/terra-money/station/blob/9064625093f352b1e8d65a44cfb81ef98e2775ce/src/extension/Confirm.tsx#L116
from wallet-provider.
ok, I think I'm supposed to lookup the hash info after - but when I do lcd.tx.txInfo(res.result.txhash)
I get a 404
however, if I delay it by several seconds, then it works.
is this a bug? or is there some way to tell wallet.post()
to wait until the block is resolved?
from wallet-provider.
@dakom After you broadcast Tx, it takes time for it to be processed as a block.
It will be a txhash
value after post()
. We tend to wait for the block to be processed by polling txInfo()
at regular intervals of 500ms to 1000ms based on the corresponding txhash.
- Tx process sample on Anchor : https://github.com/Anchor-Protocol/anchor-web-app/blob/master/app/src/%40anchor-protocol/webapp-fns/tx/earn/deposit.ts#L53
- postTx : https://github.com/Anchor-Protocol/anchor-web-app/blob/d721940746de1de39c1d077e1324973b9783ce9a/app/src/%40anchor-protocol/webapp-fns/tx/internal/_postTx.ts#L12
- pollTxInfo : https://github.com/Anchor-Protocol/anchor-web-app/blob/d721940746/app/src/%40anchor-protocol/webapp-fns/tx/internal/_pollTxInfo.ts
The above codes are part of the Anchor WebApp and may seem too complicated, but there is no simple example code.
It would be nice to add an example of waiting for txhash after post()
. Currently, I am developing related to col-5 update, so I think I need time to add that example.
from wallet-provider.
Thanks @iamssen !
I'm happy to share my "hello world" sorta project once I have it working... I'm moving the wallet integration stuff into its own iframe so that could help it be a nice reference since the core functions will be totally abstracted.
Closing the issue :)
from wallet-provider.
Related Issues (20)
- Post transaction becomes unusable when user is inactive HOT 4
- Update Modal to allow for Desktop Deeplinks to Desktop Terra Station App
- problem with terra station HOT 1
- Interchain wallet
- Hooks do not update when changing network
- Signbytes public key is different from my own public key
- Wallet sign result return Dangerous tx
- Wallet status is still `INITIALIZING` after denying connect request
- Get address of signer after verifying bytes HOT 1
- [TERRA] No handler found event: SYN
- Include broadcast error from TxResult in connectedWallet.post
- How to get cw20tokens HOT 4
- Unable to start the application HOT 1
- [plugin server-bare-modules] Package subpath './package.json' is not defined by "exports" when using remix.run HOT 1
- Change network to Classic in the web wallet
- How to add keplr wallet ?
- The engine "node" is incompatible with this module. Expected version ">=16". Got "14.19.3"
- Terra Station Wallet signing problem for Classic HOT 2
- Popup with XDefi
- Trx msgs are not serialized properly for Wallet Connect on Classic network. HOT 1
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 wallet-provider.