neu-fi / regen-bingo

Monorepo for both backend and contract developments of Regen Bingo!
https://regen.bingo
2 stars 1 forks source link

Fix the double toast message on wrong networks #54

Closed hantuzun closed 1 year ago

hantuzun commented 1 year ago

How to replicate:

  1. Switch to an unsupported network on MetaMask.
  2. Refresh https://regen.bingo/

What I see: Two "Switch to Goerli" toasts.

What is expected. One toast.

Inspect the cause of the issue. Do not just bandaid this behavior. We better have a single component dealing with this problem, not one.

hantuzun commented 1 year ago

I merged the PR, but this issue is not fixed yet.

oytuncoban commented 1 year ago

I merged the PR, but this issue is not fixed yet.

Please refer to the description of the PR #59. The issue will still there unless reactStrictMode is set to false. And it must not be true when deployed to the Mainnet or Göerli.

hantuzun commented 1 year ago

The issue was there without the strict mode as well. Fixed with https://github.com/neu-fi/regen-bingo/commit/c4737fe2ea11136ee7fa0519729f69127d64ed44