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

Getting an error when trying to use terra.lcd.staking.delegations(delegator) #36

Closed
amanusk opened this issue Oct 14, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@amanusk
Copy link

amanusk commented Oct 14, 2020

I am getting an error when trying to use terra.lcd.staking.delegations(delegator);
This is the address I used in tequila:
https://tequila-fcd.terra.dev/staking/delegators/terra1xpjtwmemdwz053q4jxjx0ht4dtp25rc799deyf/delegations

Expected to receive the delegation state of the address.
Instead got a crash:

(node:22793) UnhandledPromiseRejectionWarning: Error: [DecimalError] Invalid argument: [object Object]
    at parseOther (/Users/amanusk/Code/Terra/terra-new-playground/node_modules/decimal.js/decimal.js:3604:13)
    at new Decimal (/Users/amanusk/Code/Terra/terra-new-playground/node_modules/decimal.js/decimal.js:4353:55)
    at new Int (/Users/amanusk/Code/Terra/terra-new-playground/node_modules/@terra-money/terra.js/dist/core/numeric.js:126:20)
    at Delegation.fromData (/Users/amanusk/Code/Terra/terra-new-playground/node_modules/@terra-money/terra.js/dist/core/staking/Delegation.js:40:96)
    at Array.map (<anonymous>)
    at /Users/amanusk/Code/Terra/terra-new-playground/node_modules/@terra-money/terra.js/dist/client/lcd/api/StakingAPI.js:82:72
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:22793) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:22793) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@hanjukim hanjukim added the bug Something isn't working label Oct 14, 2020
@ouiliame
Copy link
Contributor

@amanusk is fixed in #37

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

No branches or pull requests

3 participants