Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

fix: Fixes #251. Show validation error when value to send decimal places exceeds max decimal places of token #290

Merged
merged 5 commits into from
Dec 14, 2018

Conversation

ltfschoen
Copy link
Contributor

@ltfschoen ltfschoen commented Dec 13, 2018

If the user enters 0.9 Wei (i.e. 0.0000000000000000009) on the "Send Ether" page, then we show the following validation error (since we know the name of its smallest unit):

screenshot 2018-12-13 at 23 18 00

Whereas if they are trying to send any other token, for example on the "Send THIBCoin" page, we check the token's decimal places (which corresponds to the minimum token value) and show the validation error if the user enters a value that has more decimal places than the token's (max) decimal places as shown below:
screenshot 2018-12-13 at 23 17 28

@amaury1093
Copy link
Collaborator

Tested, works well! Thanks

@amaury1093 amaury1093 merged commit 1e35bb1 into master Dec 14, 2018
@amaury1093 amaury1093 deleted the luke-251-warning-min-one-wei branch December 14, 2018 10:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants