Skip to content

Fix mobile sync filtering of ERC20 tokens#10591

Merged
Gudahtt merged 1 commit intodevelopfrom
fix-mobile-sync-non-erc20-tokens
Mar 4, 2021
Merged

Fix mobile sync filtering of ERC20 tokens#10591
Gudahtt merged 1 commit intodevelopfrom
fix-mobile-sync-non-erc20-tokens

Conversation

@Gudahtt
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt commented Mar 4, 2021

In #10510 we changed how tokens are stored, keying them by chainId rather than network type. However we didn't update our mobile sync function to account for this, which ended up breaking the filtering logic used to prepare the data that is synced.

Specifically, custom tokens added by users are filtered out to just those that are confirmed to be ERC20 tokens in our built-in list of tokens. This filters out unrecognized tokens and NFTs.

The filtering logic has been restored to the pre-#10510 behaviour. The tokens remain keyed by chainId though, which is different from pre-v9.1.0

In #10510 we changed how tokens are stored, keying them by `chainId`
rather than network type. However we didn't update our mobile sync
function to account for this, which ended up breaking the filtering
logic used to prepare the data that is synced.

Specifically, custom tokens added by users are filtered out to just
those that are confirmed to be ERC20 tokens in our built-in list of
tokens. This filters out unrecognized tokens and NFTs.

The filtering logic has been restored to the pre-#10510 behaviour.
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [72a1d88]
Page Load Metrics (587 ± 33 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint45795774
domContentLoaded3766555867033
load3776565877033
domInteractive3766545867033

@Gudahtt Gudahtt marked this pull request as ready for review March 4, 2021 21:07
@Gudahtt Gudahtt requested a review from a team as a code owner March 4, 2021 21:07
@Gudahtt Gudahtt requested review from brad-decker and darkwing March 4, 2021 21:07
@Gudahtt Gudahtt changed the title Fix mobile sync of ERC20 tokens Fix mobile sync filtering of ERC20 tokens Mar 4, 2021
@Gudahtt Gudahtt merged commit 79a7199 into develop Mar 4, 2021
@Gudahtt Gudahtt deleted the fix-mobile-sync-non-erc20-tokens branch March 4, 2021 22:13
@github-actions github-actions bot locked and limited conversation to collaborators Mar 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants