How to observe confirmed event when received a transfer transaction from another wallet in blockchain? #2788
hiephuynhFDS
started this conversation in
General
Replies: 1 comment
-
Do you mean someone is sending a transaction to your address and you want to show the confirmation on the UI? Presently getting pending transactions to an address requires listening for all the pending transactions and filtering to only those in which let txHashes = [];
provider.on('pending', tx => {
if(tx.to == wallet.address) txHashes.push(tx.hash);
}) Once you have the transaction hash, then it is easy to just use: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have used the waitForTransactions to handle when send a Tx
Beta Was this translation helpful? Give feedback.
All reactions