@@ -102,8 +102,8 @@ const updateConnectStatus = async () => {
102
102
103
103
async function checkChain ( ) {
104
104
let chainId = 0 ;
105
- if ( chain === 'rinkeby ' ) {
106
- chainId = 4 ;
105
+ if ( chain === 'goerli ' ) {
106
+ chainId = 5 ;
107
107
} else if ( chain === 'polygon' ) {
108
108
chainId = 137 ;
109
109
} else if ( chain === 'ethereum' ) {
@@ -120,15 +120,15 @@ async function checkChain() {
120
120
// This error code indicates that the chain has not been added to MetaMask.
121
121
if ( err . code === 4902 ) {
122
122
try {
123
- if ( chain === 'rinkeby ' ) {
123
+ if ( chain === 'goerli ' ) {
124
124
await window . ethereum . request ( {
125
125
method : 'wallet_addEthereumChain' ,
126
126
params : [
127
127
{
128
- chainName : 'Rinkeby Test Network' ,
128
+ chainName : 'Goerli Test Network' ,
129
129
chainId : web3 . utils . toHex ( chainId ) ,
130
130
nativeCurrency : { name : 'ETH' , decimals : 18 , symbol : 'ETH' } ,
131
- rpcUrls : [ 'https://rinkeby .infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161' ] ,
131
+ rpcUrls : [ 'https://goerli .infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161' ] ,
132
132
} ,
133
133
] ,
134
134
} ) ;
@@ -223,7 +223,7 @@ async function loadInfo() {
223
223
} , 1000 ) ;
224
224
225
225
let priceType = '' ;
226
- if ( chain === 'rinkeby ' || chain === 'ethereum' ) {
226
+ if ( chain === 'goerli ' || chain === 'ethereum' ) {
227
227
priceType = 'ETH' ;
228
228
} else if ( chain === 'polygon' ) {
229
229
priceType = 'MATIC' ;
@@ -288,7 +288,7 @@ function setTotalPrice() {
288
288
const totalPriceWei = BigInt ( info . deploymentConfig . mintPrice ) * BigInt ( mintInputValue ) ;
289
289
290
290
let priceType = '' ;
291
- if ( chain === 'rinkeby ' || chain === 'ethereum' ) {
291
+ if ( chain === 'goerli ' || chain === 'ethereum' ) {
292
292
priceType = 'ETH' ;
293
293
} else if ( chain === 'polygon' ) {
294
294
priceType = 'MATIC' ;
@@ -317,8 +317,8 @@ async function mint() {
317
317
. mint ( amount )
318
318
. send ( { from : window . address , value : value . toString ( ) } ) ;
319
319
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 } ` ;
322
322
const mintedContainer = document . querySelector ( '.minted-container' ) ;
323
323
const countdownContainer = document . querySelector ( '.countdown' ) ;
324
324
const mintedTxnBtn = document . getElementById ( "mintedTxnBtn" ) ;
@@ -354,8 +354,8 @@ async function mint() {
354
354
. presaleMint ( amount , merkleJson )
355
355
. send ( { from : window . address , value : value . toString ( ) } ) ;
356
356
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 } ` ;
359
359
const mintedContainer = document . querySelector ( '.minted-container' ) ;
360
360
const countdownContainer = document . querySelector ( '.countdown' ) ;
361
361
const mintedTxnBtn = document . getElementById ( "mintedTxnBtn" ) ;
0 commit comments