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 and import (#23798) #23871

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

bergeron
Copy link
Contributor

@bergeron bergeron commented Apr 5, 2024

Cherry pick #23798 to 11.14.0

## **Description**

Fixes issues with detecting and manually importing tokens, caused by
recent controller changes.

Hotfix for 11.14.0

This state publish had an undefined variable, and had the wrong function
signature:

<img width="597" alt="Screenshot 2024-03-28 at 6 04 41 PM"
src="https://github.com/MetaMask/metamask-extension/assets/3500406/15cd8341-725b-49d8-bd4d-bf8539185214">

Which prevented the controllers from processing account switches.

A test was failing because RPC requests were sent before onboarding.
Delayed the enabling of token detection controller to
`triggerNetworkrequests`.


Also patching this fix for detection during account switch on mainnet
when autodetection=off:
MetaMask/core#4133

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/23798?quickstart=1)


## **Related issues**

Fixes:
- #23526
- #23612


## **Manual testing steps**


## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.
@bergeron bergeron requested a review from a team as a code owner April 5, 2024 21:28
Copy link
Contributor

github-actions bot commented Apr 5, 2024

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.

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@types/[email protected] None 0 5.96 kB types

🚮 Removed packages: npm/@types/[email protected]

View full report↗︎

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Apr 5, 2024
@bergeron bergeron merged commit 6ac918d into Version-v11.14.0 Apr 8, 2024
62 of 64 checks passed
@bergeron bergeron deleted the brian/cherry-pick-token-fixes branch April 8, 2024 16:31
@github-actions github-actions bot locked and limited conversation to collaborators Apr 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants