client.getNonce() no longer works with SDK v0.39.0
See original GitHub issueRunning 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:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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.
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.