walletconnect-monorepo: provider.enable Doesn't Resolve
Calling provider.enable to show the QR modal works, but if the user closes the modal by clicking the cross and then provider.enable is called again, the QR modal doesn’t render and the promise never resolves.
Version 1.0.0-beta.47
This code can be run to replicate the issue:
import WalletConnectProvider from "@walletconnect/web3-provider";
const provider = new WalletConnectProvider({
infuraId: '<INFURA_ID>'
});
async function run() {
console.log("calling enable first time");
await provider
.enable()
.then(() => console.log("first call resolved"))
.catch(() => console.log("first call error"));
console.log("calling enable second time");
await provider
.enable()
.then(() => console.log("second call resolved"))
.catch(() => console.log("second call error"));
}
run()
// -> calling enable first time
// -> first call error
// -> calling enable second time
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 23 (2 by maintainers)
Please reopen this issue @pedrouid
@pedrouid This demo illustrates that this bug persists and the issue should be re-opened
Interesting edge case, I’ve never seen this one before. Thanks for reporting 🙏 I will try to get a fix soon.
The issue still persist.
I’m also suffering from the same issue still persisting on
@walletconnect/web3-provider: "^1.4.1".Hey @pedrouid I just tested this with version
1.0.13and I am still seeing the same behavior. Did you test with the above sample code with that version and see that is was fixed?