MetaMask / MetaMask/metamask-extension
'Add suggested tokens' action blocks further requests to Metamask [Only Firefox]
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
**Describe the bug**
After you confirm/reject the 'Add suggested tokens' action in the Metamask popup, Metamask stops responding to further requests.
**Steps to reproduce**
**It's the browser-specific bug, that can be reproduced only in Firefox.**
1. Go to https://app.sushi.com/en/swap or any other website that provides the 'Add suggested tokens' functionality. Connect your Metamask account.
2. Click on the 'Add xSUSHI to your MetaMask wallet' button on the navbar.
3. Confirm or reject the request (your choice doesn't affect the resulting bug).
4. Try to click on the 'Add xSUSHI to your MetaMask wallet' button again (or on the button on the right). You won't see the Metamask popup. Only page reloading helps.
Metamask FF extension version 10.8.1
Reproduced on Windows and macOS.
**Expected behavior**
You can add another token or do any other request to Metamask.
**Browser details:**
- OS: macOS Monterey 12.0.1 (21A559), Windows 10
- Hardware Wallet: -
- Browser: Firefox Browser 95.0.2 (64-bit) (Windows and macOS)
- MetaMask Version: Metamask FF extension version 10.8.1
**Additional context**
The Promise that is created when you open the Metamask popup is never settled (fulfilled/rejected). So the issue has to do not with the second Metamask request, but with the first one and especially with the 'Add token' functionality. Since the previous request is not settled, you can't perform a new request. In other browsers (tested in Chrome and Edge) the promise is settled and you can click on the mentioned button again.
Contributor guide
Research direction
Start by reproducing the 'Add suggested tokens' flow in Firefox and tracing the promise created when the MetaMask popup opens. Compare the confirm and reject paths with Chrome or Edge; done means the promise settles and a subsequent MetaMask request opens without reloading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100