Skip to content

Commit

Permalink
feat: add Xahau mainnet and testnet networks (#860)
Browse files Browse the repository at this point in the history
- Change `Hooks` terminology (network) to Xahau
- Instead of Hooks Testnet, add Xahau mainnet & testnet

### Context of Change

- 1x dropdown (network) change
- 1x dropdown (network) add
- env vars & small bits of code changed from `hooks` to `Xahau`, while
keeping the reference to executed Hooks etc. in place

## Note

Websocket endpoints:

Mainnet: `wss://xahau.network`
Testnet: `wss://xahau-test.net`
  • Loading branch information
WietseWind authored Oct 31, 2023
1 parent fa7f9d8 commit d2ab3c5
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 11 deletions.
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
9 changes: 7 additions & 2 deletions src/containers/Header/NetworkPicker/NetworkPicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,13 @@
}

/* 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);
}

/* stylelint-disable-next-line selector-class-pattern -- needed here for variables */
&.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

0 comments on commit d2ab3c5

Please sign in to comment.