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

anchorEarn.balance error #10

Open
SmartAppsX opened this issue Jul 31, 2021 · 6 comments
Open

anchorEarn.balance error #10

SmartAppsX opened this issue Jul 31, 2021 · 6 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@SmartAppsX
Copy link

I got this error after query the balance with anchorEarn.balance

Cannot read property 'amount' of undefined
at TerraAnchorEarn. (\node_modules@anchor-protocol\anchor-earn\dist\facade\terra-anchor-earn.js:325:71)
at Generator.next ()
at fulfilled (\node_modules@anchor-protocol\anchor-earn\dist\facade\terra-anchor-earn.js:5:58)
at processTicksAndRejections (internal/process/task_queues.js:95:5)

@SmartAppsX
Copy link
Author

It seems to happen when the account is recently created and doesn't have any funds.

terra-anchor-earn.js

account_balance: getNaturalDecimals(accountBalance[0].amount.toString()),

In this line the var accountBalance is undefined and can't access to the [0] item

@MSNTCS
Copy link
Contributor

MSNTCS commented Sep 7, 2021

Thanks for the report, we will reflect that on the new release.

@kiruthikraaj
Copy link

Is this issue resolved ? I am still facing the error.

@diegodelrieu
Copy link

Having the same issue, seemingly not resolved yet.

@MSNTCS MSNTCS added bug Something isn't working good first issue Good for newcomers labels Nov 12, 2021
@MSNTCS
Copy link
Contributor

MSNTCS commented Nov 12, 2021

@SmartAppsX thank you for the report. @diegodelrieu @kiruthikraaj v1.1.1 is just released, please use that. That has the fix.

@kiruthikraaj
Copy link

kiruthikraaj commented Nov 18, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants