oxheadalpha / nft-tutorial

Tezos FA2 NFT CLI Tool And Tutorial
MIT License
92 stars 25 forks source link

tznft show-balance fails #17

Closed dyske closed 2 years ago

dyske commented 2 years ago

tznft show-balance returns "invalid inspector storage state" because lib/contracts.js at line 133 checks if (Array.isArray(storage)) and storage is not an array but:

storage {
  state: [
    { request: [Object], balance: [BigNumber] },
    { request: [Object], balance: [BigNumber] }
  ]
}

So, when I edited it to:

        if (Array.isArray(storage.state))
            printBalances(storage.state);
        else {

It worked.

emishur commented 2 years ago

Thank you for finding and reporting the issue. It is fixed now