o1js
o1js copied to clipboard
fetchAccount() throws "TypeError: Cannot destructure property 'publicKey' of 'account' as it is null." error on accounts not included into ledger
Calling fetchAccount() for the account not included in the ledger with o1js 0.18.0 and one of the following devnet endpoints:
https://proxy.devnet.minaexplorer.com/graphql
https://api.minascan.io/node/devnet/v1/graphql
throws the following error:
TypeError: Cannot destructure property 'publicKey' of 'account' as it is null.
at parseFetchedAccount (node_modules/o1js/dist/node/index.cjs:19925:11)
at fetchAccountInternal (node_modules/o1js/dist/node/index.cjs:20270:17)
at fetchAccount (node_modules/o1js/dist/node/index.cjs:20251:10)
To whoever from us is fixing this: It means that the node returns something which we don't recognize as an error / missing account, and try to parse as an account.
Seems the graphql endpoint behaviour has changed