Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update decimal precision for account list item and token list #30594

Merged
merged 8 commits into from
Feb 27, 2025

Conversation

gambinish
Copy link
Contributor

@gambinish gambinish commented Feb 26, 2025

Description

Adds 5 decimal place precision to token cell and account list item. Also should remove trailing zeros.

Related issues

Fixes:

Manual testing steps

Screenshots/Recordings

Screenshot 2025-02-27 at 8 21 48 AM Screenshot 2025-02-27 at 8 22 18 AM Screenshot 2025-02-27 at 8 22 49 AM

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@gambinish gambinish marked this pull request as ready for review February 26, 2025 23:47
@gambinish gambinish requested a review from a team as a code owner February 26, 2025 23:47
@gambinish gambinish requested a review from a team as a code owner February 27, 2025 15:29
@metamaskbot
Copy link
Collaborator

Builds ready [f3e3d10]
Page Load Metrics (1748 ± 84 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15262272175817685
domContentLoaded15182208171816278
load15242266174817684
domInteractive2699432210
backgroundConnect10184403919
firstReactRender1576302210
getState462212110
initialActions01000
loadScripts11101768129014771
setupStore8351163
uiStartup17682587202720196
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 286 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

const bnBalance = new BigNumber(balanceOrFallback);
const formattedBalanceToTranslate = formatWithThreshold(
bnBalance.toNumber(),
0.00001,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this represent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the lower threshold. Meaning, that if the balance is less than 0.00001 we append a < to the threshold and display it.

So if the balance is 0.00000001 we will display <0.00001

This is partially relevant to the ADR we discussed in Slack.

@metamaskbot
Copy link
Collaborator

Builds ready [5bf785c]
Page Load Metrics (1624 ± 93 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint32320441507424204
domContentLoaded14192020159817584
load14282035162419493
domInteractive2111134189
backgroundConnect7177303919
firstReactRender1478382311
getState44914157
initialActions01000
loadScripts9991518118213565
setupStore75616178
uiStartup159524751867252121
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 286 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Contributor

@zone-live zone-live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gambinish gambinish added this pull request to the merge queue Feb 27, 2025
@gambinish gambinish removed this pull request from the merge queue due to a manual request Feb 27, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [adde985]
Page Load Metrics (1817 ± 73 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint32320761653439211
domContentLoaded15782303179215574
load15882319181715273
domInteractive2811639189
backgroundConnect1375322010
firstReactRender1575372311
getState572262412
initialActions01000
loadScripts11541758132113163
setupStore85913115
uiStartup18342690208119192
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 286 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@gambinish gambinish added this pull request to the merge queue Feb 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 27, 2025
@gambinish gambinish added this pull request to the merge queue Feb 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 27, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [814e122]
Page Load Metrics (1837 ± 73 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint32221391763366176
domContentLoaded15252058180014569
load15732086183715373
domInteractive288237126
backgroundConnect9198394220
firstReactRender167629178
getState4117222713
initialActions00000
loadScripts10841596133913766
setupStore860272211
uiStartup18222448210017886
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 286 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@gambinish gambinish added this pull request to the merge queue Feb 27, 2025
Merged via the queue into main with commit 711ebe8 Feb 27, 2025
79 checks passed
@gambinish gambinish deleted the fix/flask-decimal-places branch February 27, 2025 22:39
@github-actions github-actions bot locked and limited conversation to collaborators Feb 27, 2025
@metamaskbot metamaskbot added the release-12.15.0 Issue or pull request that will be included in release 12.15.0 label Feb 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.15.0 Issue or pull request that will be included in release 12.15.0 team-assets
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants