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

feat: add Xahau mainnet and testnet networks #860

Merged
merged 5 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ VITE_MAINNET_LINK=
VITE_TESTNET_LINK=
VITE_DEVNET_LINK=
VITE_AMM_LINK=
VITE_HOOKS_TESTNET_LINK=
VITE_XAHAU_MAINNET_LINK=
VITE_XAHAU_TESTNET_LINK=
VITE_CUSTOMNETWORK_LINK=
VITE_VALIDATOR=vl.ripple.com

Expand Down
3 changes: 2 additions & 1 deletion public/locales/en-US/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"network_name_mainnet": "Mainnet",
"network_name_devnet": "Devnet",
"network_name_amm": "AMM-Devnet",
"network_name_hooks_testnet": "Hooks-Testnet",
"network_name_xahau_mainnet": "Xahau Mainnet",
"network_name_xahau_testnet": "Xahau Testnet",
"network_name_custom": "Custom",
"app.meta.description": "XRPL Network Explorer",
"app.meta.author": "Ripple",
Expand Down
3 changes: 2 additions & 1 deletion public/locales/es-ES/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"network_name_mainnet": "Mainnet",
"network_name_devnet": "Devnet",
"network_name_amm": "AMM-Devnet",
"network_name_hooks_testnet": "Hooks-Testnet",
"network_name_xahau_mainnet": "Xahau Mainnet",
"network_name_xahau_testnet": "Xahau Testnet",
"network_name_custom": "Personalizada",
"app.meta.description": "Explorador de la Red XRPL",
"app.meta.author": "Ripple",
Expand Down
3 changes: 2 additions & 1 deletion public/locales/fr-FR/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"network_name_mainnet": "Mainnet",
"network_name_devnet": "Devnet",
"network_name_amm": "AMM-Devnet",
"network_name_hooks_testnet": "Hooks-Testnet",
"network_name_xahau_mainnet": "Xahau Mainnet",
"network_name_xahau_testnet": "Xahau Testnet",
"network_name_custom": "Personnalisé",
"app.meta.description": "Explorateur XRPL",
"app.meta.author": "Ripple",
Expand Down
3 changes: 2 additions & 1 deletion public/locales/ja-JP/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"network_name_mainnet": "Mainnet",
"network_name_devnet": "Devnet",
"network_name_amm": "AMM-Devnet",
"network_name_hooks_testnet": "Hooks-Testnet",
"network_name_xahau_mainnet": "Xahau Mainnet",
"network_name_xahau_testnet": "Xahau Testnet",
"network_name_custom": "Custom",
"app.meta.description": "XRPLネットワークエクスプローラ",
"app.meta.author": "Ripple",
Expand Down
3 changes: 2 additions & 1 deletion public/locales/ko-KR/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"network_name_mainnet": "Mainnet",
"network_name_devnet": "Devnet",
"network_name_amm": "AMM-Devnet",
"network_name_hooks_testnet": "Hooks-Testnet",
"network_name_xahau_mainnet": "Xahau Mainnet",
"network_name_xahau_testnet": "Xahau Testnet",
"network_name_custom": "Custom",
"app.meta.description": "XRPL 네트워크 탐색기",
"app.meta.author": "리플",
Expand Down
8 changes: 6 additions & 2 deletions src/containers/Header/NetworkPicker/NetworkPicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@
}

/* stylelint-disable-next-line selector-class-pattern -- needed here for variables */
&.network-hooks_testnet {
@include dropdown-network-item($hooks-testnet, $magenta-40);
&.network-xahau_mainnet {
@include dropdown-network-item($xahau-mainnet, $green-50);
}

&.network-xahau_testnet {
@include dropdown-network-item($xahau-testnet, $magenta-40);
}

&.network-custom {
Expand Down
3 changes: 2 additions & 1 deletion src/containers/Header/NetworkPicker/NetworkPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const STATIC_ENV_LINKS: Record<string, string | undefined> = {
testnet: process.env.VITE_TESTNET_LINK,
devnet: process.env.VITE_DEVNET_LINK,
amm: process.env.VITE_AMM_LINK,
hooks_testnet: process.env.VITE_HOOKS_TESTNET_LINK,
xahau_mainnet: process.env.VITE_XAHAU_MAINNET_LINK,
xahau_testnet: process.env.VITE_XAHAU_TESTNET_LINK,
}
const currentMode: string = process.env.VITE_ENVIRONMENT || 'mainnet'

Expand Down
3 changes: 2 additions & 1 deletion src/containers/shared/NetworkContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const ENV_NETWORK_MAP: Record<string, string> = {
testnet: 'test',
devnet: 'dev',
amm: 'amm-dev',
hooks_testnet: 'hooks-test',
xahau_mainnet: 'xahau-main',
xahau_testnet: 'xahau-test',
}

function getNetworkName() {
Expand Down
3 changes: 2 additions & 1 deletion src/containers/shared/css/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ $white-transparent: rgb(255 255 255 / 75%);
// Networks
$testnet: $orange;
$devnet: $blue-purple-30;
$hooks-testnet: $magenta-30;
$xahau-mainnet: $green-40;
$xahau-testnet: $magenta-30;
$custom: $yellow-50;

// Feature Sets
Expand Down
Loading