Status-react: Values in wallet are converted to scientific notation format

Created on 16 Nov 2017  ·  9Comments  ·  Source: status-im/status-react

Description

Type: Bug

Summary: This is due to latest change with ERC681 @jeluard has commited. It's a side effect of changing the internal way of handling numbers. After that small sums entered on [Send] transaction wallet screen are converted to scientific format ( like 6e-7) which is not very user-friendly. We need to come up with the descision how we want to display small amounts. The reason is to make the information more readable and stay aligned with all wallet screens, as for now on Request screen I can enter small amount whitout any conversion.

Reproduction

  • Open Status
  • Go to Wallet - Send
  • Enter 0.0000006 in Amount field

image

Additional Information

  • Status version: latest develop 0.9.10-370-g7e6507be+ (1927)
  • Operating System: Android, iOS
bug fix them all

All 9 comments

It has to be clarified how we what to display small values as scientific notation is only used for small value.

What has been entered here is 0,000000001 which is hardly readable.

I think when it's about money/ETH/tokens the best is to show to the user exactly what he/she entered. If it's a small unreadable amount then fine, show the same amount. Like MyEtherWallet does, for example:
screen shot 2017-11-17 at 20 00 46
@jeluard are you going to check with design team?

@hesterbruikman @andmironov @denis-sharypin what would you suggest from design point of view?

I think we should use plain numbers with small formatting (I added small spaces every three digits)

format numbers

after discussion with @jeluard @hesterbruikman decision was to show what user typed, e.g. 0,000000001 For after MVP stage: design team need to come with better readable solution for long amounts like this, as it's hard to count zeros to understand what amount will be sent

related issue? In wallet -> Send transaction. If type 0.00000055 then amount is converted to 0. Note that after typing 1st "5" amount becomes 5e-7 and when type second "5" amount becomes 0. So user can't send 0.00000055 from wallet (or any other small sum)

Ouch, yes, especially on release people might try such small amounts when they are exploring the app. @jeluard where are we on this issue? Can you move forward or do you need alternative design solutions?

@annadanchenko Is that for a specific token?
@hesterbruikman Thanks I think we have enough information to fix that for now!

can't reproduce on nightly build March 14 (ios/android). Seems like it was silently fixed somewhere :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mfekadu picture mfekadu  ·  3Comments

flexsurfer picture flexsurfer  ·  3Comments

andmironov picture andmironov  ·  3Comments

alwx picture alwx  ·  4Comments

andmironov picture andmironov  ·  3Comments