When I call approval() QRCodeModal is open but when I scan QRcode nothing happen #1655
Unanswered
OstapDutkevych
asked this question in
Developer Support
Replies: 2 comments 1 reply
-
What wallet are you using? |
Beta Was this translation helpful? Give feedback.
1 reply
-
I'm facing the same problem here. @chinmayHefty have you considered another option? Actually, is there another option? I have the feeling that nothing is ready to be used, which is quite frustrating. |
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
-
Describe the issue
When I call approval() QRCodeModal is open but when I scan QRcode nothing happen
SDK Version (if relevant)
"@walletconnect/sign-client": "^2.1.1",
To Reproduce
To reproduce the behavior follow the instructions on https://docs.walletconnect.com/2.0/javascript/sign/installation
Create a new application
Install the packages above
Initialize the startup code from the installation page
`const signClient = await SignClient.init({
projectId: "65540ae88ea4b0258d3f53b4c7f0aacb",
});
try {
const {uri, approval} = await signClient.connect({
requiredNamespaces: {
eip155: {
methods: [
"eth_sendTransaction",
"eth_signTransaction",
"eth_sign",
"personal_sign",
"eth_signTypedData",
],
chains: ["eip155:1"],
events: ["chainChanged", "accountsChanged"],
},
},
});
if (uri) {
QRCodeModal.open(uri, () => {
console.log("EVENT", "QR Code Modal closed");
});
}
// Await session approval from the wallet.
const session = await approval();
// Handle the returned session (e.g. update UI to "connected" state).
// await onSessionConnected(session);
console.log(session)
} catch (e) {
console.error(e);
} finally {
// Close the QRCode modal in case it was open.
QRCodeModal.close();
}
`
Expected behavior
Should create session after I scan QRcode
Desktop (please complete the following information):
OS: MacOS
Browser Chrome
Additional context
maybe i'm doing something wrong
Could you please tell me what the problem is?
Please let me know how to best lend a hand
Beta Was this translation helpful? Give feedback.
All reactions