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

Issues with reconnecting session from saved pairing topic #315

Open
OmniKobra opened this issue Sep 15, 2024 · 2 comments
Open

Issues with reconnecting session from saved pairing topic #315

OmniKobra opened this issue Sep 15, 2024 · 2 comments

Comments

@OmniKobra
Copy link

OmniKobra commented Sep 15, 2024

Describe the bug
Reconnecting a session from saved pairing topic causes issues with Web3App.request() eth_sendTransaction

To Reproduce
1- Connecting from trust wallet to my dApp
2- save pairing topic for reconnection in case of restarting app.
3-call Web3App.request(eth_sendTransaction..etc) with current session topic.
4- the request works and trust wallet prompts user to approve transaction.
5-Close app, start it up again
6- call Web3App.connect() with the pairing topic saved in step 2 => it succeeds
7- call Web3App.request same as in step 3, and receive the following error:
Pairing _onMessageEvent, Received data: {id: 1726420638420461, jsonrpc: 2.0, error: {code: 5300, message: Invalid Session Properties requested}}
printed as:
JsonRpcError(code: 5300, message: Invalid Session Properties requested)

Expected behavior
Expected to work same as first initial connection

Reproducible code

Screenshots
This is where the error happens upon reconnection.
Screenshot 2024-09-15 202707
Screenshot 2024-09-15 203252
Screenshot 2024-09-15 203138

Smartphone (please complete the following information):
Platform agnostic, doesnt matter which device i test on it allways does the explained issue

Additional context
Developing a dApp, testing with trust wallet and metamask, fuji testnet.

@OmniKobra
Copy link
Author

Update: the logic works fine with metamask, issue seems to be from trust wallet.

@quetool
Copy link
Collaborator

quetool commented Sep 17, 2024

Hello @OmniKobra! Any chance you can share a minimum reproducible code in text format? Also, about the point 6

call Web3App.connect() with the pairing topic saved in step 2 => it succeeds

You don't need to do that, it's everything handled by SDK, once you connect to a wallet you shouldn't need to care about saving the topic and reconnect, reconnection happens automatically.

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

2 participants