Skip to content

Commit

Permalink
Metamask change networkVersion to net_version
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusWentz committed Jul 22, 2024
1 parent c1b8dc5 commit b449e58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ async function enableMetamaskOnSepolia() {
//Get account details from Metamask wallet.
getAccount();
//Check if user is on the Sepolia testnet. If not, alert them to change to Sepolia.
if(window.ethereum.networkVersion != baseSepoliaChainId){
if(window.ethereum.net_version != baseSepoliaChainId){
// alert("You are not on the Sepolia Testnet! Please switch to Sepolia and refresh page.")
try{
await window.ethereum.request({
Expand Down

0 comments on commit b449e58

Please sign in to comment.