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

Delegation amount keeps resetting to 0 #180

Closed
willyogo opened this issue Nov 3, 2023 · 2 comments · Fixed by #190
Closed

Delegation amount keeps resetting to 0 #180

willyogo opened this issue Nov 3, 2023 · 2 comments · Fixed by #190

Comments

@willyogo
Copy link

willyogo commented Nov 3, 2023

gm frens! currently unable to delegate ATOM because after clicking 'Create Transaction', the Amount gets reset to 0.

Here's a screen recording encountering the bug:

delegation.amount.stuck.at.0.mov
@abefernan
Copy link
Contributor

ATOM uses 6 decimals for pretty printing uatom. It should work if you use 6 decimals at most instead of 7. But we should improve form validation

@webmaster128
Copy link
Member

Decimal.fromUserInput throws if the fractional part has more digits than supported. But it seems like the exception is turned into a 0 value here:

    const microCoin = (() => {
      try {
        return macroCoinToMicroCoin({ denom, amount }, chain.assets);
      } catch {
        return { denom, amount: "0" };
      }
    })();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants