balancer / balancer-exchange

Exchange dapp for token swaps
https://balancer.exchange
GNU General Public License v3.0
95 stars 104 forks source link

Improve token amount input truncation #130

Closed TomAFrench closed 2 years ago

TomAFrench commented 4 years ago

It's very unlikely that the calculated output of a trade will terminate in a short number of decimal places so in the vast majority of trades some decimals are truncated. This results in an unceremonious cutting in half of a number as below.

Screenshot_2020-07-13_17-43-27

I've added some css to mean that instead some ellipses are added signalling the overflow.

Screenshot_2020-07-13_17-46-43

I've also modified the input such that it fills the full container's width. This means that in the case that the max button isn't shown, that area may be used for displaying more digits.