-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not getting success callback/ receipt with walletconnect with web3.js 1.3.3 #3891
Comments
By chance do you have a demo app? |
No I don't have demo app, let me know if it is required, will make it tomorrow. |
For a sanity check, I tested this locally using |
If you could provide a demo app, it would help debugging tremendously |
@spacesailor24 Ok will try to make demo, btw I tried approve method of ERC20 contract & wallet was connected using metamask mobile app on Android using Walletconnect QR code, on rinkeby test network. Btw it is working as expected with metamask browser extension but not with Walletconnect so we downgraded app to 1.2.11. |
I am having the same issue with ganache-cli. The contract deploys but the transactionHash is always undefined. The then callback is never called too. The issue is happening on web3-eth-contract@1.3.4. |
@spacesailor24 Hi, here is the demo app for the issue, please see README for steps, don't forget to set 'REACT_APP_INFURA_ID' in '.env' before connecting. |
Could you provide a code snippet of what's not working? I can do the same for code that was working using ganache-cli |
Forgot to @ujal ^ |
Awesome, thank you! I'll be taking a look at this shortly |
contract.deploy({ data: bytecode }).send({ from: account }, function(err, transactionHash) {
console.log(transactionHash)
}).then(function(newContract) {
console.log(newContract.options.address)
}); |
Oops I misread! @ujal said the tx hash was never received I'll have to take a look at it further tomorrow morning, sorry for the inconvenience! |
Ok @ujal issue might be different but if you check code he posted, he is not listening for transactionHash event, so may be he didn't checked for it. I was also not listening for transactionHash event before as I can show success only after receipt is received & Receipt also has txHash, txHash event is added just for debugging purpose. Goal is to receive the receipt after transaction is confirmed on blockchain. |
I updated my example repo above to include the |
@pedrouid can you see if |
@spacesailor24 yes there must be some miscommunication but as it was working with web3 |
it is perfectly working on version 1.2.11 .1.3 version has some issues in getting the receipt hook |
@spacesailor24 Hi, any update on this, are you sure its not a web3.js issue? if yes then why its working correctly with |
My dapp also not getting a callback when connecting through WalletConnect, the web3 version we are using is 1.3.0 |
I'm having the same issue (web3 |
I have since removed subscriptions as it seems they're not supported with WalletConnect's provider, but the issue remains. |
Same issue, using web3 1.3.4 cannot get callback. |
@jeromevvb your code will work, transactionHash is being received in 1.3, but not receipt, I think you misread the issue. |
@aksdevac My Apologies, Indeed i misread the issue. I have the same issue also. |
@aksdevac I tried to reproduce it with the sample repo you provide. I tried version |
I found the problem. 😌 Its because of an assumption that if a provider specified an I could not find any reference supporting this assumption. The EIP-1193 suggest that providers MUST be implementing And there is no standard way to identify if a provider is supporting particular subscription. Unless we have one, I think we should not be relying on the subscriptions for this particular flow of transactions receipt and confirmation and alway use the pooling technique. |
@jdevcs @spacesailor24 While I was testing the fix, I observed that bandwidth usage was increased for the app, which is obvious while checking for receipt with polling technique this will occur. I also thought the increased bandwidth usage may hinder many apps. What you guys think on it? |
Was having the same issue with web3 v1.5 (getting txHash but not receipt). Downgraded to 1.2.11 and now I get receipt. Using "@walletconnect/web3-provider": "^1.6.5" |
even with 1.6.5 my code remains stuck in await. |
… 1.3.3 - Closes #3891 (#4304) * 🐛 Fix transaction receipt polling technique * ✅ Add unit test for the delay scenario * 🔧 Add configuration option "blockHeaderTimeout" * 📝 Add docs for the new configuration * ✅ Add unit test for the configuration * 🔖 Update change log file * ✅ Fix failing unit test * Update comment I'm just going to commit this since it's a comment change, and so I can provide my approval without it going stale * 🎨 Update default value for blockHeaderTimeout to 10 seconds Co-authored-by: Wyatt Barnes <wyatt@writerof.software>
hello the problem is not resolved. In metamask on iPhone, no callback is issued |
why close this issue. I am having the same issue in version 1.6.0 |
|
@spacesailor24 so my problem is fixed in v1.6.1-rc.0? |
@xale76 It should be, please test it and let us know! |
@spacesailor24 it seems to work! great |
@spacesailor24 can I use this version or it's better to wait next official release? |
@xale76 It's an untested version, the official release won't be until after this week, but if it solves a problem for you, then it's at your discretion. Keep in mind you'll have to hardcode the RC version in your package.json (as you already have), and will have to revert the change when the official release comes out |
I was facing the same problem. I was using the |
I am still getting this issue on 1.7.0 |
Bumping my web3 dependency to web3@1.7.3 fixed the issue for me |
Expected behavior
Actual behavior
on 'receipt' OR below one
Never gets called but it is working fine with web3.js 1.2.11.
Steps to reproduce the behavior
Logs
Environment
WalletConnect web3 provider: tried 1.3.1 & current latest 1.3.4
Node: 14.15.x
web3.js: 1.3.3 & 1.3.4.rc1
OS: Mac OS 11.1
If possible please release new 1.2.x version with Metamask hotfix, if it can't be fixed quickly with 1.3.x
The text was updated successfully, but these errors were encountered: