@@ -102,8 +102,8 @@ const updateConnectStatus = async () => {
102102
103103async function checkChain ( ) {
104104 let chainId = 0 ;
105- if ( chain === 'rinkeby ' ) {
106- chainId = 4 ;
105+ if ( chain === 'goerli ' ) {
106+ chainId = 5 ;
107107 } else if ( chain === 'polygon' ) {
108108 chainId = 137 ;
109109 } else if ( chain === 'ethereum' ) {
@@ -120,15 +120,15 @@ async function checkChain() {
120120 // This error code indicates that the chain has not been added to MetaMask.
121121 if ( err . code === 4902 ) {
122122 try {
123- if ( chain === 'rinkeby ' ) {
123+ if ( chain === 'goerli ' ) {
124124 await window . ethereum . request ( {
125125 method : 'wallet_addEthereumChain' ,
126126 params : [
127127 {
128- chainName : 'Rinkeby Test Network' ,
128+ chainName : 'Goerli Test Network' ,
129129 chainId : web3 . utils . toHex ( chainId ) ,
130130 nativeCurrency : { name : 'ETH' , decimals : 18 , symbol : 'ETH' } ,
131- rpcUrls : [ 'https://rinkeby .infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161' ] ,
131+ rpcUrls : [ 'https://goerli .infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161' ] ,
132132 } ,
133133 ] ,
134134 } ) ;
@@ -223,7 +223,7 @@ async function loadInfo() {
223223 } , 1000 ) ;
224224
225225 let priceType = '' ;
226- if ( chain === 'rinkeby ' || chain === 'ethereum' ) {
226+ if ( chain === 'goerli ' || chain === 'ethereum' ) {
227227 priceType = 'ETH' ;
228228 } else if ( chain === 'polygon' ) {
229229 priceType = 'MATIC' ;
@@ -288,7 +288,7 @@ function setTotalPrice() {
288288 const totalPriceWei = BigInt ( info . deploymentConfig . mintPrice ) * BigInt ( mintInputValue ) ;
289289
290290 let priceType = '' ;
291- if ( chain === 'rinkeby ' || chain === 'ethereum' ) {
291+ if ( chain === 'goerli ' || chain === 'ethereum' ) {
292292 priceType = 'ETH' ;
293293 } else if ( chain === 'polygon' ) {
294294 priceType = 'MATIC' ;
@@ -317,8 +317,8 @@ async function mint() {
317317 . mint ( amount )
318318 . send ( { from : window . address , value : value . toString ( ) } ) ;
319319 if ( mintTransaction ) {
320- if ( chain === 'rinkeby ' ) {
321- const url = `https://rinkeby .etherscan.io/tx/${ mintTransaction . transactionHash } ` ;
320+ if ( chain === 'goerli ' ) {
321+ const url = `https://goerli .etherscan.io/tx/${ mintTransaction . transactionHash } ` ;
322322 const mintedContainer = document . querySelector ( '.minted-container' ) ;
323323 const countdownContainer = document . querySelector ( '.countdown' ) ;
324324 const mintedTxnBtn = document . getElementById ( "mintedTxnBtn" ) ;
@@ -354,8 +354,8 @@ async function mint() {
354354 . presaleMint ( amount , merkleJson )
355355 . send ( { from : window . address , value : value . toString ( ) } ) ;
356356 if ( presaleMintTransaction ) {
357- if ( chain === 'rinkeby ' ) {
358- const url = `https://rinkeby .etherscan.io/tx/${ presaleMintTransaction . transactionHash } ` ;
357+ if ( chain === 'goerli ' ) {
358+ const url = `https://goerli .etherscan.io/tx/${ presaleMintTransaction . transactionHash } ` ;
359359 const mintedContainer = document . querySelector ( '.minted-container' ) ;
360360 const countdownContainer = document . querySelector ( '.countdown' ) ;
361361 const mintedTxnBtn = document . getElementById ( "mintedTxnBtn" ) ;
0 commit comments