Skip to content
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

In React Wallet v2 the modal closes if another request is made right after connecting #302

Open
kujtimprenkuSQA opened this issue Oct 4, 2023 · 0 comments

Comments

@kujtimprenkuSQA
Copy link
Contributor

kujtimprenkuSQA commented Oct 4, 2023

Note this can be reproduced only after this other PR is merged: #301

There's a "strange" behavior when making another request like near_signIn right after the connect has been approved as shown in the video below:

walletconnect-issue.webm

What I suspect is that this line ModalStore.close() in SessionProposalModal is executed a bit later then the new session_request for near_signIn has been made. As shown in the video right after clicking "Approve" the request for near_signIn shows for a split second and the modal gets closed without giving a chance to either approve or reject.

If we add some waiting time between the connect and another request in a dApp then the modals open and close correctly, but this is not an ideal solution

// this is some dummy pseudo code
await signClient.connect(params)

await wait(1000) // wait for 1 sec

// make a new request
await signClient.request(params)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant