MoralisWeb3 / youtube-tutorials

631 stars 1.42k forks source link

Please Help #30

Open nellford2011 opened 2 years ago

nellford2011 commented 2 years ago

Does anyone uderstand what this error means please? It is related to a BRAVE browser console error when pressing the Submit button.

MetaMask - RPC Error: Provided chainId "4" must match the active chainId "1"

nellford2011 commented 2 years ago

We have followed the tutorial perfectly, doin ghte code ouselves and it didn't work. We then deleted our project, pasted the final code from here, updated the missing " in the latest update and still have no luck

charlytp2 commented 2 years ago

ChainId 4 is the Rinkeby test chain. In order to use Rinkeby with MetaMask you’ll need to enable the test networks in the “Advanced” section of the extension settings.

Goto - networks - show/hide network - enable show test network - select rinkeby network

Note: This will only solve the problem for development environments. ChainId 1 is mainnet which is where the real business happens. I still haven’t found Moralis documentation for how to switch to this.