-
Notifications
You must be signed in to change notification settings - Fork 60
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
Pass chainId to registerRequestHandler #258
Comments
Hello @Rimantovas, not sure I follow your concern 🤔 Could you elaborate a bit more? |
The following method passes the session topic and request parameters to the handler. It would be nice to also get the chainId
|
Ok but what do you mean by "having multiple EVM chains connected"? You can not have "multiple EVM chains connected". Your paired session between dapp/wallet always works on the current active chain. |
Yes, you can only have one active chain at a time, but you can pass multiple chains as optional namespaces. |
Created a pull request that solves this issue @quetool |
Hello @Rimantovas! Here you can see the PR that would fix your issue! TL;DR: After this PR is merged you will have to handle your methods with onSessionRequest subscription (as it was supposed to be originally but was broken). method handlers registration will still work perfectly but if you want to access the current chainId then onSessionRequest subscription is your way to go #269 |
Is your feature request related to a problem? Please describe.
When having multiple EVM chains connected, it is hard to determine which chain to interact with
Describe the solution you'd like
Pass chainId parameter to registerRequestHandler handler function. Since we already have it in _onSessionRequest, it won't be hard to implement.
The text was updated successfully, but these errors were encountered: