question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not able to sign wasm messages with Keplr connected to Ledger

See original GitHub issue

I have been looking into this issue for a few days as I have experienced this issue on my own project. Ledger does not support the protobuf message type and needs to fall back on the amino encoding.

This issue can be repeated on the example dApps running on https://dapps.juno.giansalex.dev/wallet/.

Is there a way to force CosmJS and Keplr to use the amino message type? I have tried window.getOfflineSignerOnlyAmino(chainId: string) as recommended in https://docs.keplr.app/api/cosmjs.html, but that seems to break the Keplr integration.

Would love to know if there is an existing workaround for this issue. Going to keep investigating and see if I can identify a fix.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
giansalexcommented, Oct 3, 2021

@ben2x4 you need to use getOfflineSignerAuto

Also, window.getOfflineSignerAuto(chainId: string): Promise<OfflineSigner | OfflineDirectSigner> or window.getOfflineSignerAuto(chainId: string): Promise<OfflineSigner | OfflineDirectSigner> API is supported. Please note that the value returned is async. This API automatically returns a signer that only supports Amino if the account is a Ledger-based account, and returns a signer that is compatible for both Amino and Protobuf if the account is a mnemonic/private key-based account.

1reaction
assafmocommented, Nov 30, 2021

I can confirm that @giansalex’s comment solved this for me too! Ledger signing started working after I switched getOfflineSigner for getOfflineSignerAuto (code reference). 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Secret-wasm implementation · Issue #36 · chainapsis/keplr ...
The reason for is that when a webpage handles the encryption/decryption, Keplr will not be able to decrypt the message for user to...
Read more >
Set up and use Keplr to access your Ledger Cosmos (ATOM ...
This tutorial describes how to set up and use the Keplr web app with your Ledger device to access your Ledger Cosmos (ATOM)...
Read more >
Keplr - Secret Network Integration Update
This week is going to be all about integrating WASM contract signing to Keplr (which would complete the deliverables for milestone 1), and...
Read more >
Cant connect Keplr to emeris : r/cosmosnetwork - Reddit
It shows like 15 chains it wants to connect to but i cant approve, the button isnt visible. Any idea how to fix...
Read more >
Use with CosmJs - Keplr wallet
You can connect Keplr to CosmJS using the OfflineSigner . ... The window.keplr.enable(chainId) method will request the user to unlock their Keplr extension...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found