Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot destructure property 'length' of 'e' as it is undefined. #1137

Open
jeesunikim opened this issue Jan 22, 2025 · 2 comments
Open

Cannot destructure property 'length' of 'e' as it is undefined. #1137

jeesunikim opened this issue Jan 22, 2025 · 2 comments
Labels

Comments

@jeesunikim
Copy link
Contributor

jeesunikim commented Jan 22, 2025

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
Image

@jeesunikim jeesunikim added the bug label Jan 22, 2025
@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Jan 22, 2025
@silence48
Copy link
Contributor

It's because that is a host function not a contract... you can build a spec for the SAC manually if you want

@silence48
Copy link
Contributor

oh also that's an async method i think try to await it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog (Not Ready)
Development

No branches or pull requests

2 participants