MetaMask / MetaMask/metamask-extension

Should the request reject or throw error if users denies changing network?

Open
#11,980 1 comment 0 reactions 0 assignees View on GitHub
area-api
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**
Screen Shot 2021-08-31 at 12 02 55

**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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.