Cannot destructure property 'length' of 'e' as it is undefined.
Describe the bug
I tested contract.Client.from with three contracts on TESTNET. It worked fine until I tested XLM contract on TESTNET CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC. It failed with Cannot destructure property 'length' of 'e' as it is undefined. error. Perhaps, this isn't supposed to work with XLM contract; however, if that's the case we need to update the documentation with a different contract.
const client = contract.Client.from({
contractId,
networkPassphrase,
rpcUrl,
});
What version are you on?
"@stellar/stellar-sdk": "^13.1.0"
To Reproduce
Steps to reproduce the behavior:
call XLM contract CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC with contract.Client.from function, open a console, and you'll see an error.
Expected behavior
I expected it to return response that includes entries
Additional context
It's because that is a host function not a contract... you can build a spec for the SAC manually if you want
oh also that's an async method i think try to await it.
Closing in favor of https://github.com/stellar/js-stellar-sdk/issues/1166 which is a dupe