Status-react: Amount and Network Fee text overlap in 'Sending' screen when there are long values

Created on 18 Oct 2019  Â·  12Comments  Â·  Source: status-im/status-react

Bug Report

Problem

Transaction amount and network fee often calculated up to eighteenth digit precision (in case of 18-decimals asset). In that case the 'Amount' and 'Network Fee' text on the 'Sending...' screen overlapped by it's value.

Expected behavior

Long values of amount and network fee does not overlap the text

I would ask to truncate … the numeric values at the end so that the entire text label of Amount / Network Fee is visible. Both are already displayed in their entirety in the header of the bottom sheet.

Actual behavior

Screenshot 2019-10-18 at 09 48 49

Reproduction

  • Open Status and create new account
  • Navigate to Wallet -> Status account-> Send and select any Recipient
  • Enter in Amount field the 0.0848969596969696969 value -> Sign transaction
  • Tap Network Fee and update gas price to 1.0989898

Additional Information

  • Status version: develop nightly 0.14.0 (2019171002)
  • Operating System:
design-input-required bounty-xs bug

All 12 comments

@errorists, @andmironov need your design input here

agree it's not great. I would ask to truncate … the numeric values at the end so that the entire text label of Amount / Network Fee is visible. Both are already displayed in their entirety in the header of the bottom sheet.

@rachelhamlin is it a good candidate for bounty?

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__This issue now has a funding of 60.0 DAI (60.0 USD @ $1.0/DAI) attached to it.__

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__Work has been started__.

These users each claimed they can complete the work by 1 week, 1 day from now.
Please review their action plans below:

1) acolytec3 has been approved to start work.

I will resolve the bug described. What is the number of digits we should truncate to in the resolution?
2) kingcocomango has applied to start work _(Funders only: approve worker | reject worker)_.

I'll fix this issue such that it'll show as many digits as possible without truncating the text.

Learn more on the Gitcoin Issue Details page.

@rachelhamlin just applied for this one. Can I pick it up?

Approved @acolytec3! Can we truncate to the maximum amount that fits the screen while still displaying the Amount and Network Fee text in full?

@rachelhamlin Yep, I think there are probably a couple of ways to approach this one but need to experiment a little bit. I've tried directly truncating the values for Amount and Network Fee but that yields the situation but the most straight forward method for doing so yields a fixed length decimal (i.e. the two amounts are always X.XXXX ETH). This would have the benefit of always having a guaranteed maximum size displayed like (1.23456 ETH) but also results in (1.00000 ETH) which I'm assuming we don't want. I'm going to try overriding the width props on the columns and see if that works and explore some other string formatting ideas if that doesn't do it.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__Work for 60.0 DAI (60.0 USD @ $1.0/DAI) has been submitted by__:

  1. @acolytec3

@StatusSceptre please take a look at the submitted work:

  • PR by @acolytec3

@StatusSceptre PR merged! Hopefully gitcoin doesn't get confused by this being in the old DAI :smiley:

@rachelhamlin @StatusSceptre Can this one get paid out today, now that it's merged? Just don't want it to get lost since the issue is closed.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__The funding of 60.0 SAI (60.0 USD @ $1.0/SAI) attached to this issue has been approved & issued to @acolytec3.__

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alwx picture alwx  Â·  4Comments

jarradh picture jarradh  Â·  4Comments

flexsurfer picture flexsurfer  Â·  3Comments

denis-sharypin picture denis-sharypin  Â·  4Comments

andytudhope picture andytudhope  Â·  4Comments