fix: cherry-pick fix check for undefined marketData (#28870) #28950
+15
−15
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
Cherry pick to 12.9 RC of: #28870
This PR fixes app crash after user removes a network then adds it back and clicks on import token banner
Related issues
Fixes:
#28019 (comment) Fixes: #28882 Fixes: #28864
Manual testing steps
Manual steps are also described in the github
issue. However; I do not think that the Show native token as main balance needs to be ONt o repro the initial issue. Also no need to add new RPC from chainList;
Settings:
On main view
Select an account which has some ERC20 tokens in Polygon
Add Polygon default network
See tokens are autodetected and you can open the modal -> but don't import the tokens!
Switch to another network
Delete Polygon network
Re-add Polygon default network
Click Import tokens --> Wallet should not crash
Screenshots/Recordings
Before
After
Pre-merge author checklist
Standards.
Pre-merge reviewer checklist
Description
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist