MetaMask / MetaMask/metamask-extension
Should the request reject or throw error if users denies changing network?
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
**Describe the bug**
`window.ethereum.on('chainChanged')` returns the same if users accepts or cancels
**Steps to reproduce (REQUIRED)**
Click, cancel when prompted to change network (see video)
https://user-images.githubusercontent.com/85146/131553143-db709d8a-9f80-443d-85c3-2586f96bd8aa.mov
**Expected behavior**
A clear description of what you expected to happen.
**Screenshots**

**Browser details (please complete the following information):**
- OS: [e.g. OS X]
- Browser: [e.g. Chrome Version ]
- MetaMask Version: [e.g. 5.0.2]
Contributor guide
Research direction
Reproduce the network-change flow by cancelling the prompt as described and inspect the handling of `window.ethereum.on('chainChanged')`. Determine the expected behavior for a cancelled network change—rejection or an error—and define completion around making the observed result distinguishable from acceptance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100