Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: testnet mode #52

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
NEXT_PUBLIC_API_BASE_URL= # Example: https://api.example.com
NEXT_PUBLIC_PROJECT_ID= # ProjectID from WalletConnect
TESTNET= # true or false
NEXT_PUBLIC_TESTNET_MODE= # true or false
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $ cp .env.example .env
- Set up `NEXT_PUBLIC_API_BASE_URL` with ZKchainHub Backend API url. It will typically run on `http://localhost:3000`
- (Optionally)
- Set `NEXT_PUBLIC_PROJECT_ID` with your [Wallet Connect](https://walletconnect.com/) ProjectID
- Set `TESTNET` with `true` to use testnet mode with testnet backend API URL set up in `NEXT_PUBLIC_API_BASE_URL`
- Set `NEXT_PUBLIC_TESTNET_MODE ` with `true` to use testnet mode with testnet backend API URL set up in `NEXT_PUBLIC_API_BASE_URL`

## 🏃 Running the app

Expand Down
2 changes: 1 addition & 1 deletion src/containers/Header/DesktopHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const DesktopHeader = ({
<StyledHeader>
<LogoContainer onClick={goToHome} role='button' aria-label='Navigate to home'>
<Logo src={theme === 'dark' ? LogoDark : LogoLight} alt='ZK Chain Hub' />
{TESTNET_MODE === 'true' && <Testnet>testnet</Testnet>}
{TESTNET_MODE === 'true' && <Testnet>Testnet</Testnet>}
</LogoContainer>
<SBox>
<Gas />
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Header/MobileHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const MobileHeader = ({ theme, goToHome, handleChangeLanguage, localesMap
<StyledHeader>
<LogoContainer onClick={goToHome} role='button' aria-label='Navigate to home'>
<Logo src={theme === 'dark' ? LogoDark : LogoLight} alt='ZK Chain Hub' />
{TESTNET_MODE === 'true' && <Testnet>testnet</Testnet>}
{TESTNET_MODE === 'true' && <Testnet>Testnet</Testnet>}
</LogoContainer>

<IconsContainer>
Expand Down
Loading