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: Token list should respect hideZeroBalance setting #29058

Merged
merged 18 commits into from
Dec 11, 2024

Conversation

gambinish
Copy link
Contributor

@gambinish gambinish commented Dec 10, 2024

Description

If a token is not a native asset for a chain, and the balance is zero, it should not be rendered if the hideZeroBalance setting is toggled to true.

Open in GitHub Codespaces

Related issues

Fixes: erc20 and native tokens with zero balance rendering on asset list on 12.9 release.

Manual testing steps

  1. Add an erc20 token to any chain with zero balance, should display when imported by default
  2. Toggle hideZeroBalance setting to true in general settings

Respect the "hide zero balance" setting (when true):
- Native tokens should always display with zero balance when on the current network filter.
- Native tokens should not display with zero balance when on all networks filter
- ERC20 tokens with zero balances should respect the setting on both the current and all networks.
Respect the "hide zero balance" setting (when false):
- Native tokens should always display with zero balance when on the current network filter.
- Native tokens should always display with zero balance when on all networks filter
- ERC20 tokens always display with zero balance on both the current and all networks filter.

Screenshots/Recordings

Screen.Recording.2024-12-10.at.3.21.09.PM.mov

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 December 10, 2024 18:08
@metamaskbot
Copy link
Collaborator

Builds ready [73bd217]
Page Load Metrics (2601 ± 358 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint30341882091992476
domContentLoaded171041212567748359
load178441362601745358
domInteractive27194986330
backgroundConnect1394402210
firstReactRender1796382311
getState823781768742
initialActions01000
loadScripts131235472061656315
setupStore7151021
uiStartup200249803073942452
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 119 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@gambinish gambinish added the regression-RC-12.9 Regression bug that was found in release candidate (RC) for release 12.9 label Dec 10, 2024
bergeron
bergeron previously approved these changes Dec 10, 2024
@darkwing darkwing added the portfolio-view Used for PRs and issues related to Q4 2024 portfolio view label Dec 10, 2024
darkwing
darkwing previously approved these changes Dec 10, 2024
sahar-fehri
sahar-fehri previously approved these changes Dec 10, 2024
@gambinish gambinish dismissed stale reviews from sahar-fehri and darkwing via e2cac2a December 11, 2024 00:25
@gambinish gambinish added this pull request to the merge queue Dec 11, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [e2cac2a]
Page Load Metrics (2275 ± 167 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint38631652086658316
domContentLoaded173830912242336161
load175931672275347167
domInteractive27124502713
backgroundConnect8107352914
firstReactRender158231189
getState972201452412
initialActions01000
loadScripts135024491771290139
setupStore7221142
uiStartup203838572624424204
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 120 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Merged via the queue into main with commit 3453c95 Dec 11, 2024
75 checks passed
@gambinish gambinish deleted the fix/12.9-zero-balance-tokens branch December 11, 2024 01:58
@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2024
@metamaskbot metamaskbot added the release-12.10.1 Issue or pull request that will be included in release 12.10.1 label Dec 11, 2024
@gambinish gambinish changed the title fix: Token list should respect hidezerobalance setting fix: Token list should respect hideZeroBalance setting Dec 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
portfolio-view Used for PRs and issues related to Q4 2024 portfolio view regression-RC-12.9 Regression bug that was found in release candidate (RC) for release 12.9 release-12.10.1 Issue or pull request that will be included in release 12.10.1 team-assets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants