This repository was archived by the owner on Dec 26, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +20
-3
lines changed Expand file tree Collapse file tree 4 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 28
28
"tokenIDPlaceholder" : " Enter Token ID" ,
29
29
"mintTokenText" : " Mint your Token" ,
30
30
"connectWalletText" : " Connect Wallet" ,
31
+ "ethereumDevNetworkPrompt" : " Please Connect to the Ethereum Rinkeby Testnet" ,
31
32
"ethereumNetworkPrompt" : " Please Connect to the Ethereum Mainnet" ,
32
33
"availableTokensText" : " View the available Token IDs" ,
33
34
"mintPageHeader" : " DEVS Token Minter" ,
43
44
"here" : " here" ,
44
45
"errorMinting" : " Unable to Mint NFT" ,
45
46
"disconnectWallet" : " Disconnect Wallet" ,
46
- "etherscanMessage" : " View your TX on Etherscan"
47
+ "etherscanMessage" : " View your TX on Etherscan" ,
48
+ "testnet" : " Testnet"
47
49
}
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import WalletConnectProvider from '@walletconnect/web3-provider';
26
26
import Web3Modal from 'web3modal' ;
27
27
import { useTranslation } from 'next-i18next' ;
28
28
import {
29
+ NODE_ENV ,
29
30
DEVELOPER_DAO_CONTRACT ,
30
31
DEVELOPER_DAO_CONTRACT_NETWORK ,
31
32
ERROR_CODE_TX_REJECTED_BY_USER ,
@@ -269,7 +270,12 @@ const DirectMint = ({ developerId }: DirectMintProps) => {
269
270
</ Modal >
270
271
) }
271
272
272
- { networkError && < Text color = "red" > { t ( 'ethereumNetworkPrompt' ) } </ Text > }
273
+ { networkError && NODE_ENV === 'development' && (
274
+ < Text color = "red" > { t ( 'ethereumDevNetworkPrompt' ) } </ Text >
275
+ ) }
276
+ { networkError && NODE_ENV === 'production' && (
277
+ < Text color = "red" > { t ( 'ethereumNetworkPrompt' ) } </ Text >
278
+ ) }
273
279
</ >
274
280
) ;
275
281
} ;
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from 'react';
2
2
import DirectMint from './DirectMint' ;
3
3
import Logo from '../../components/Logo' ;
4
4
import {
5
+ Badge ,
5
6
Box ,
6
7
Container ,
7
8
Flex ,
@@ -11,7 +12,7 @@ import {
11
12
Link ,
12
13
} from '@chakra-ui/react' ;
13
14
import { useTranslation } from 'next-i18next' ;
14
- import { TOKEN_FINDER_URL } from '../../utils/DeveloperDaoConstants' ;
15
+ import { NODE_ENV , TOKEN_FINDER_URL } from '../../utils/DeveloperDaoConstants' ;
15
16
16
17
// Layout for the Direct Mint Box
17
18
// used on the minting page
@@ -28,6 +29,9 @@ const DirectMintBox = () => {
28
29
>
29
30
< Stack spacing = { 6 } align = "center" >
30
31
< Logo w = { 52 } h = { 52 } />
32
+ { NODE_ENV === 'development' && (
33
+ < Badge colorScheme = "orange" > { t ( 'testnet' ) } </ Badge >
34
+ ) }
31
35
< Heading fontSize = { { base : '1.25rem' , sm : '2rem' } } >
32
36
{ t ( 'mintPageHeader' ) }
33
37
</ Heading >
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { useRouter } from 'next/router';
5
5
import { serverSideTranslations } from 'next-i18next/serverSideTranslations' ;
6
6
import { useTranslation } from 'next-i18next' ;
7
7
import {
8
+ NODE_ENV ,
8
9
DEVELOPER_DAO_CONTRACT ,
9
10
DEVELOPER_DAO_CONTRACT_ABI ,
10
11
DEVELOPER_DAO_CONTRACT_NETWORK_PROVIDER ,
@@ -13,6 +14,7 @@ import {
13
14
} from '../utils/DeveloperDaoConstants' ;
14
15
import {
15
16
chakra ,
17
+ Badge ,
16
18
Input ,
17
19
Text ,
18
20
Button ,
@@ -61,6 +63,9 @@ function App() {
61
63
< VStack mx = "auto" px = { 4 } spacing = { 5 } w = "full" maxW = "lg" >
62
64
< Logo w = { 32 } h = { 32 } />
63
65
< VStack w = "full" >
66
+ { NODE_ENV === 'development' && (
67
+ < Badge colorScheme = "orange" > { t ( 'testnet' ) } </ Badge >
68
+ ) }
64
69
< Text fontSize = "xl" > { t ( 'searchId' ) } </ Text >
65
70
< Input
66
71
aria-label = "Search by developer ID"
You can’t perform that action at this time.
0 commit comments