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

Show nicer parsing errors in promptCurrency #3567

Merged
merged 1 commit into from
Feb 27, 2023
Merged

Conversation

NullSoldier
Copy link
Contributor

@NullSoldier NullSoldier commented Feb 26, 2023

Summary

This will help parse the untyped errors from bignumber and add a new function to try and display them more cleanly.

It also now logs the reason for prompt errors.

$ fishy wallet:send

Enter the amount (balance 0.00000000): 0.000000000005
Error: fractional component exceeds 8 decimals
Enter the amount (balance 0.00000000): fisdfjgdsdsfds
Error: invalid decimal value
Enter the amount (balance 0.00000000): -4
Error: Minimum is 0.00000001
Enter the amount (balance 0.00000000): 4
Enter the public address of the recipient:

Testing Plan

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and
what additional work is required, if any.

[ ] Yes

Copy link
Contributor

@hughy hughy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also check and render an error message if the value passed in is greater than the available balance?

@NullSoldier
Copy link
Contributor Author

Hmmm let's get this in and see if users want that next

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 this pull request may close these issues.

2 participants