interface icon indicating copy to clipboard operation
interface copied to clipboard

NANJ-ETH on uni v1 decimal display issue

Open nardholio opened this issue 6 years ago • 5 comments

image

nardholio avatar Sep 22 '20 21:09 nardholio

I couldn't reproduce this locally nor on the uniswap app itself on http://app.uniswap.org.ipns.localhost:8081/#/swap?use=v1

@nardholio could you provide steps to reproduce the issue?

platocrat avatar Dec 20 '20 22:12 platocrat

Couldn't reproduce it on the regular non-IPFS URL at https://app.uniswap.org/#/swap?use=v1 either:

Screen Shot 2020-12-20 at 4 05 04 PM

platocrat avatar Dec 20 '20 22:12 platocrat

Hi! I took a look into this and reproduced the issue. After selecting a currency you get an overflow by entering a super big number for ETH (Note: it takes A LOT of zeros or any other random numbers)

Updating the ETH value image

This seems an edge case since I feel it would be rare for a user to have that amount of ETH/other currency to swap. Also, this overflow will occur on any currency when updating the From value and the To (estimated) swap value will also stop converting.

Another example with 0xBitcoin image

JKirkYuan avatar Dec 26 '20 05:12 JKirkYuan

@moodysalem what is seen as an acceptable fix here?

  1. Ellipsis with tooltip showing full number
  2. Font resizing of number, perhaps add a tooltip as well to cover the edge case of the number becoming too small.
  3. Wrap number but keep in container with no overlap of other text

I think 1 or 2 work.

MRHarrison avatar Jan 14 '21 16:01 MRHarrison

Seems like displaying the number in scientific notation could be a solution (for example all numbers >10^12)

jochenboesmans avatar May 02 '21 21:05 jochenboesmans