-
Notifications
You must be signed in to change notification settings - Fork 41
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
Get "Unmatched chain id with the offline signer" with last updates #131
Comments
Hey @jwtradera! The interfaces for v1.5 have changed a bit as a result of the switch to grpc-gateway. https://github.com/scrtlabs/rps-ui/blob/main/store/index.js#L79 Let me know if this helps! |
Hi |
That endpoint is a mainnet one, and from your chain-id it seems like you're trying to connect to the pulsar-2 testnet. You can use any of the endpoints publicly available from here: https://docs.scrt.network/secret-network-documentation/development/connecting-to-the-network |
This should be fixed in v1.6.10, can you confirm @jwtradera? |
I used secretjs alpha version before.
And used keplr wallet for query & broadcast transactions.
It was works fine before I updated secretjs version.
But when I update with v1.5, get this error: "Unmatched chain id with the offline signer".
Of course, set chainid as "pulsar-2" for both client side and wallet setting.
this.scrtSecretJs = new SecretNetworkClient({ url: env.grpcurl, chainId: env.CHAIN_ID, wallet: keplrOfflineSigner, walletAddress: this.scrtUsrPubkey, encryptionUtils: this.scrtKeplr.getEnigmaUtils(env.CHAIN_ID), });
After my own research, I find this issue related with parameter names.
For old version, there is _ for parameters. (ex: chain_id => chainId, code_id => codeId).
But names updated and some wallet sdk (not sure that) is just working with chain_id.
This one is what I find that error part in CosmJSOfflineSigner. (from chrome console, not from github source).
e.CosmJSOfflineSigner = class extends i { constructor(t, e) { super(t, e), this.chainId = t, this.keplr = e } signDirect(t, e) { return n(this, void 0, void 0, (function*() { if (this.chainId !== e.chainId) throw new Error("Unmatched chain id with the offline signer"); if ((yield this.keplr.getKey(e.chainId)).bech32Address !== t) throw new Error("Unknown signer address"); return yield this.keplr.signDirect(this.chainId, t, e) } )) } }
And this is chainId compare part.
So chainId is same, but name is different.
Is there any way to resolve this issue?
Thanks
The text was updated successfully, but these errors were encountered: