fix: always use remote token list for default petnames#23919
Merged
matthewwalsh0 merged 16 commits intodevelopfrom Apr 11, 2024
Merged
fix: always use remote token list for default petnames#23919matthewwalsh0 merged 16 commits intodevelopfrom
matthewwalsh0 merged 16 commits intodevelopfrom
Conversation
Use remote token list if petnames enabled.
Use token list polling if simulations enabled.
Collaborator
Builds ready [cf3fce5]
Page Load Metrics (1045 ± 514 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #23919 +/- ##
===========================================
+ Coverage 67.47% 67.52% +0.05%
===========================================
Files 1244 1244
Lines 48777 48830 +53
Branches 12724 12741 +17
===========================================
+ Hits 32910 32972 +62
+ Misses 15867 15858 -9 ☔ View full report in Codecov by Sentry. |
Collaborator
Builds ready [58e1387]
Page Load Metrics (766 ± 451 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
cryptotavares
previously approved these changes
Apr 10, 2024
vinistevam
previously approved these changes
Apr 10, 2024
Contributor
|
Token names are displayed when any of the following toggles enabled and not visible when all three toggles are off:
tokenNames.mov |
374da8f
Collaborator
Builds ready [94bab65]
Page Load Metrics (886 ± 469 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
vinistevam
approved these changes
Apr 11, 2024
Collaborator
Builds ready [f9da548]
Page Load Metrics (893 ± 527 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
cryptotavares
approved these changes
Apr 11, 2024
Contributor
|
New toggle in the onboarding settings: Chrome onboardingToggle.movFirefox onboardingFF.mov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Petnames (and by extension transaction simulations) rely on the token list to display default token names and symbols.
With the
Autodetect tokenspreference disabled, static data for ~600 tokens is available on mainnet and no token data is available on other chains. When enabled, data for ~4000 tokens is available on mainnet.In order to provide the most default token names possible, this PR forces the use of the remote token list for petnames, and therefore enables token list polling if any of the following preferences are enabled:
Autodetect tokens(Token Detection)Allow nicknames(Petnames)Estimate balance changes(Transaction Simulations)To ensure the necessary privacy control, the
Allow nicknamestoggle has also been added to the onboarding settings.At the technical level, this includes:
TokenListControllerlogic from thePreferencesControllerto keep it decoupled from individual domain.MetamaskController.forceRemoteargument to thegetTokenListselector.useDisplayNamehook.Related issues
Fixes: #2339
Manual testing steps
Remote Token List
Autodetect tokens.Estimate balance changes.Allow nicknames.0x94b008aa00579c1307b0ef2c499ad98a8ce58e58).Onboarding Setting
Allow nicknames.Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist