Skip to content

Commit

Permalink
fix: fix token detection modal stuck on firefox (#25279)
Browse files Browse the repository at this point in the history
## **Description**

Token detection modal seems to stay stuck on firefox

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

## **Related issues**

Fixes: #25256

## **Manual testing steps**
To run locally use: 
`rm -rf dist && ENABLE_MV3=false yarn && ENABLE_MV3=false yarn build:dev
dev --build-type main --lockdown false --snow false --apply-lavamoat
false`

1. Import wallet on firefox
2. Got to settings => security and privacy and disable token auto
detection
3. Go back to home page and you should see the token detection modal
4. Clicking on allow should dismiss the modal and enable the token
detection


## **Screenshots/Recordings**

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

### **Before**

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


https://github.com/MetaMask/metamask-extension/assets/10994169/e23f59d6-7bc9-4707-872d-436c1a56e7cf


### **After**


https://github.com/MetaMask/metamask-extension/assets/10994169/cf47e04c-e5bc-4898-92f1-c80c87988fdb




## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension 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.

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
  • Loading branch information
2 people authored and darkwing committed Jun 13, 2024
1 parent 00f7774 commit 4aadb35
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function AutoDetectTokenModal({
const dispatch = useDispatch();
const trackEvent = useContext(MetaMetricsContext);
const { chainId } = useSelector(getProviderConfig);
const locale = useSelector(getCurrentLocale);

const handleTokenAutoDetection = useCallback(
(val) => {
Expand All @@ -55,7 +56,7 @@ function AutoDetectTokenModal({
category: MetaMetricsEventCategory.Navigation,
properties: {
chain_id: chainId,
locale: getCurrentLocale,
locale,
referrer: ORIGIN_METAMASK,
},
});
Expand Down

0 comments on commit 4aadb35

Please sign in to comment.