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.

client.getNonce() no longer works with SDK v0.39.0

See original GitHub issue

Running getNonce produces the following error:

vue.runtime.esm.js?2b0e:1888 TypeError: str.toLowerCase is not a function
    at __decode (index.js?bf2b:78)
    at Object.decode (index.js?bf2b:116)
    at Function.decode (bech32.js?2ead:30)
    at Object.decodeBech32Pubkey (pubkey.js?904b:28)
    at SigningCosmosClient.getAccount (cosmosclient.js?b5a7:98)
    at async SigningCosmosClient.getNonce (cosmosclient.js?b5a7:78)

I’m thinking the problem is that the client API has changed http://localhost:1317/auth/accounts/cosmos12x4undlwc0...

v0.38.4:

{
  "height": "2",
  "result": {
    "type": "cosmos-sdk/Account",
    "value": {
      "address": "cosmos1c2ju5u3wx57zv8ceehpqcvh7nusc4vgt67dg3q",
      "coins": [
        {
          "denom": "token",
          "amount": "1000"
        }
      ],
      "public_key": "cosmospub1addwnpepqttcheas8x7p4f9km0kc9qgcguk9lkdery744tujnc2dshtjfqxh59l6gsa",
      "account_number": 2,
      "sequence": 1
    }
  }
}

v0.39.0:

{
  "height": "8",
  "result": {
    "type": "cosmos-sdk/Account",
    "value": {
      "address": "cosmos12x4up7dhsndlwc06t4p3jfn8zvz6x3t72fp30v",
      "coins": [
        {
          "denom": "token",
          "amount": "1000"
        }
      ],
      "public_key": {
        "type": "tendermint/PubKeySecp256k1",
        "value": "AvjV2kYc2DldNZ7XEqGzyoyv+sd6qJCyEps7APBE+ugV"
      },
      "account_number": "2",
      "sequence": "1"
    }
  }
}

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
webmaster128commented, Jul 27, 2020

@fadeev if you want to test or review a patch for this, see #314. That should allow you to connect to a launchpad backend. The wasmd/launchpad testing backend does not yet work.

1reaction
webmaster128commented, Jul 21, 2020

We’ll need to add support for 0.39/Launchpad. Ideally we have a tiny @cosmjs/sdk39 package that re-exports most of the functionality from @cosmjs/sdk38 and only adds the parts that changed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

v3.192.0: breaking change - client.config.endpoint() is no ...
The endpoint method exists in version 3.190.0 , but has been removed from the runtime code in 3.192.0 . SDK version number.
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