Skip to content

Prompt switch network if a user's wallet is connected to the wrong network #54

@willyogo

Description

@willyogo

As a user, I want the member portal/auction app to prompt my wallet to switch if I'm not connected to the right network and attempt to connect wallet or prompt a transaction.

AC:

  1. If a user is not on either ethereum mainnet (prod) or goerli (staging), and attempts to connects a wallet, the app should prompt the user's wallet to switch network
  2. Whenever a user is prompted to execute a transaction (ie. place bid or settle auction), the app first checks to see which network they're connected to
  3. If a user rejects the request to switch network, their wallet is not connected or prompted to execute the transaction (iow, nothing happens and the user can attempt to connect wallet or execute transaction again. if they have switched to the correct network it will work, if not they should get prompted to switch network again. this is the existing behavior for the Switch button on the Rep page)
image

here's an article on how to do this: https://www.freecodecamp.org/news/how-to-switch-blockchains-on-metamask-with-javascript/

we also have this functionality already rocking on the Rep page

image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions