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.

`getAccount()` method fails on the latest version of cosmos-sdk

See original GitHub issue

In the current implementation, getAccount() method expects that the public key is delivered as bech32. I’m not sure which version of the cosmos-sdk the changes were made, but accounts on the newer versions of the SDK return as follows:


Thus, bech32 decoding will fail and getAccount() method doesn’t work. And, because the above public key type is the same as, it is not needed to parse them.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

ethanfreycommented, Jul 24, 2020

So, 0.39 and 0.37 have the same encoding, and 0.38 was just some broken version (with bech32 addresses > 90 chars)

webmaster128commented, Jul 25, 2020

In #314 you see a solution to support 0.37-0.39 with one client. I think this make everyone’s life easier and only took 2 hours (fixing a bug in Uint64 along the way).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Function `getAccount` in SigningCosmWasmClient doesn't ...
I suspect cosmos-sdk/Account is an interface and cosmos-sdk/BaseAccount is an implementation of that interface. You are using @cosmjs/launchpad, ...
Read more >
EnsureExists returns an error if no account exists for the given address else nil. func (AccountRetriever) GetAccount ¶. func (ar AccountRetriever) GetAccount( ...
Read more >
Accounts - Cosmos SDK Documentation
In the Cosmos SDK, an account designates a pair of public key PubKey and private key PrivKey . The PubKey can be derived...
Read more >
Azure CosmosDB C# Function worked up to a few days ago
The function worked fine until a few days ago (last checked on Nov. ... Host: Error indexing method 'GetAccount'. ... AddTimers(), etc.).
Read more >
Basic API
getAccounts (); // Initialize the gaia api with the offline signer that is injected by Keplr extension. const cosmJS = new SigningCosmosClient( ...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found