javascript-sdk icon indicating copy to clipboard operation
javascript-sdk copied to clipboard

rpc methods don't work anymore

Open magmel48 opened this issue 4 years ago • 0 comments

have the following code:

const client = new rpc(node, 'mainnet');
console.log(await client.getBalances('bnb14spch0j94ya2w3fe49uf3lw9ee7vfwp8q5jups'));

error thrown:

Error: field type is not expected
    at /Users/xxx/yyy/core/node_modules/@binance-chain/javascript-sdk/lib/amino/decoder/index.js:164:15
    at Array.forEach (<anonymous>)
    at decodeObjectBinary (/Users/xxx/yyy/core/node_modules/@binance-chain/javascript-sdk/lib/amino/decoder/index.js:131:8)
...

I suppose all amino decoder is broken, maybe some new rules were not applied. The library is useless for using RPC except "raw" methods like abciQuery, etc.

magmel48 avatar Apr 24 '21 22:04 magmel48