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

refactor: Init getTokenNetworkFilter selector #29068

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

gambinish
Copy link
Contributor

@gambinish gambinish commented Dec 10, 2024

Description

We are falling back to an empty object when tokenNetworkFilter is undefined in several areas around the app. This PR aims to consolidate those within a single selector to make is easier to maintain and fall back on.

This only mitigates the issue. Root cause is that the tokenNetworkFilter needs to be added via a migration script in order to properly be present, without having to fallback.

Open in GitHub Codespaces

Related issues

Fixes: https://metamask.sentry.io/issues/6125799129/?environment=production&project=273505&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D%20firstRelease%3A12.9.0&referrer=issue-stream&sort=freq&statsPeriod=7d&stream_index=0

Manual testing steps

  1. Hardcode tokenNetworkFilter to undefined, should not break app.

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 10, 2024 20:26
@bergeron bergeron requested a review from a team as a code owner December 10, 2024 20:26
bergeron
bergeron previously approved these changes Dec 10, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [ec3c973]
Page Load Metrics (1929 ± 74 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint24321991858402193
domContentLoaded16462124190615474
load16562153192915474
domInteractive256935126
backgroundConnect97324188
firstReactRender1597383215
getState863821799546
initialActions00000
loadScripts12761704149913464
setupStore784162110
uiStartup187330052369333160
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: -114 Bytes (-0.00%)
  • common: 91 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [04f0f31]
Page Load Metrics (2103 ± 140 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint23730051940605291
domContentLoaded175629212067297143
load180129272103292140
domInteractive2798492412
backgroundConnect992372713
firstReactRender169526178
getState993251525526
initialActions00000
loadScripts137024091632267128
setupStore680162110
uiStartup204134072468366176
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: -114 Bytes (-0.00%)
  • common: 67 Bytes (0.00%)

@darkwing darkwing added the portfolio-view Used for PRs and issues related to Q4 2024 portfolio view label Dec 10, 2024
@darkwing
Copy link
Contributor

Please fill out the PR template!

@bergeron bergeron mentioned this pull request Dec 10, 2024
7 tasks
@gambinish gambinish added this pull request to the merge queue Dec 10, 2024
Merged via the queue into main with commit e7bba6d Dec 11, 2024
92 checks passed
@gambinish gambinish deleted the fix/12.9-token-network-filter-undefined branch December 11, 2024 00:13
@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
portfolio-view Used for PRs and issues related to Q4 2024 portfolio view 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.

4 participants