-
Notifications
You must be signed in to change notification settings - Fork 97
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
How to set chaindId from calling client? #48
Comments
i guess you can do it with a custom request ? i made my own version of the WCSession object tho - u might have to do the same, not sure if you actually have to or u can do it another way |
@elee1766 Please make a PR with your additions, that would be nice. I hope they add that functionality to v2. |
honestly what really should happen is chainid should be added to the sessionRequest params... it's in the spec as an optional nullable field... |
@elee1766 I'm trying to add the chainID to my fork but was not successful yet, also tried your code. |
Metamask: Chain ID [currently ignored] |
im not going to PR it b/c it's not how it should be implemented (as a custom request) just load the library and then just rewrite this class https://github.com/WalletConnect/kotlin-walletconnect-lib/blob/master/lib/src/main/kotlin/org/walletconnect/impls/WCSession.kt in your source, except change the offer function to make the extra function call then just instantiate that class instead of the one within the library when creating your session obj ez |
@elee1766 what about testing it? |
it's all in the tech spec just print out the messages ur sending/receiving on both clients and you'll see if the chain id is populated or not |
========================================= |
@sfz009900 Metamask ignores the chainId, it's stated somewhere in their docs. Also as of walletConnect V2 you shouldn't rely on chainId anymore, they say, have not look into it myself yet though. |
@mobilekosmos |
Should it be possible to set the chainId when constructing WCSession? I saw that the code works with chainIds is some parts, but if I understand it correctly this is only set AFTER the wallet connection was approved, you cannot predefine it before, right? I need to set the chainID, but don't know what part of the code to change to allow this.
The text was updated successfully, but these errors were encountered: