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 detection across multiple networks #29108

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

bergeron
Copy link
Contributor

@bergeron bergeron commented Dec 11, 2024

Description

Fixes an issue where even though 'popular networks' was selected in the token filter, it was only showing detected tokens on the current network.

There were various places checking for Object.keys(tokenNetworkFilter).length === Object.keys(allNetworks).length, which is no longer an accurate way to check the state of the filter, since it's now been narrowed to only include popular networks. The selector getIsTokenNetworkFilterEqualCurrentNetwork is used instead.

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Onboard a wallet with tokens across chains
  2. When token filter is on 'popular networks', it should show # of detected tokens across chains
  3. When token filter is on current network, it should show # of detected tokens on current chain

Screenshots/Recordings

Before

After

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.

@bergeron bergeron marked this pull request as ready for review December 11, 2024 19:01
@bergeron bergeron requested a review from a team as a code owner December 11, 2024 19:01
@gambinish gambinish self-requested a review December 11, 2024 19:10
gambinish
gambinish previously approved these changes Dec 11, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [9472a20]
Page Load Metrics (1784 ± 85 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint30822971696362174
domContentLoaded15672237175217182
load15762256178417785
domInteractive226739147
backgroundConnect9100332412
firstReactRender18100462612
getState571212110
initialActions01000
loadScripts11731729130513364
setupStore611911
uiStartup175724922012231111
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: -550 Bytes (-0.01%)
  • common: 0 Bytes (0.00%)

sahar-fehri
sahar-fehri previously approved these changes Dec 11, 2024
@bergeron bergeron dismissed stale reviews from sahar-fehri and gambinish via c46fc88 December 11, 2024 19:26
@metamaskbot
Copy link
Collaborator

Builds ready [c46fc88]
Page Load Metrics (1819 ± 90 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15902354182018790
domContentLoaded15682340179418790
load15902346181918790
domInteractive268341178
backgroundConnect875232010
firstReactRender1583432613
getState56117178
initialActions00000
loadScripts11531807134516579
setupStore65711115
uiStartup175326282019209100
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: -550 Bytes (-0.01%)
  • common: 0 Bytes (0.00%)

@bergeron bergeron enabled auto-merge December 11, 2024 20:07
@bergeron bergeron added this pull request to the merge queue Dec 11, 2024
Merged via the queue into main with commit 2693e6c Dec 11, 2024
77 checks passed
@bergeron bergeron deleted the brian/token-detection-across-networks branch December 11, 2024 20:49
@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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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