From d2ab3c5282ff8b489e06407e6784aabbffa6e583 Mon Sep 17 00:00:00 2001 From: Wietse Wind Date: Tue, 31 Oct 2023 23:08:00 +0100 Subject: [PATCH] feat: add Xahau mainnet and testnet networks (#860) - 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` --- .env.example | 3 ++- public/locales/en-US/translations.json | 3 ++- public/locales/es-ES/translations.json | 3 ++- public/locales/fr-FR/translations.json | 3 ++- public/locales/ja-JP/translations.json | 3 ++- public/locales/ko-KR/translations.json | 3 ++- src/containers/Header/NetworkPicker/NetworkPicker.scss | 9 +++++++-- src/containers/Header/NetworkPicker/NetworkPicker.tsx | 3 ++- src/containers/shared/NetworkContext.tsx | 3 ++- src/containers/shared/css/variables.scss | 3 ++- 10 files changed, 25 insertions(+), 11 deletions(-) diff --git a/.env.example b/.env.example index e8d8d3e65..af376aab6 100644 --- a/.env.example +++ b/.env.example @@ -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 diff --git a/public/locales/en-US/translations.json b/public/locales/en-US/translations.json index e5ca400b0..970c262cd 100644 --- a/public/locales/en-US/translations.json +++ b/public/locales/en-US/translations.json @@ -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", diff --git a/public/locales/es-ES/translations.json b/public/locales/es-ES/translations.json index 50d3a720f..70df5f491 100644 --- a/public/locales/es-ES/translations.json +++ b/public/locales/es-ES/translations.json @@ -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", diff --git a/public/locales/fr-FR/translations.json b/public/locales/fr-FR/translations.json index 426df0867..6ce971cfa 100644 --- a/public/locales/fr-FR/translations.json +++ b/public/locales/fr-FR/translations.json @@ -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", diff --git a/public/locales/ja-JP/translations.json b/public/locales/ja-JP/translations.json index 9df6647ba..11c1c4a1b 100644 --- a/public/locales/ja-JP/translations.json +++ b/public/locales/ja-JP/translations.json @@ -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", diff --git a/public/locales/ko-KR/translations.json b/public/locales/ko-KR/translations.json index 58244b884..3155565c2 100644 --- a/public/locales/ko-KR/translations.json +++ b/public/locales/ko-KR/translations.json @@ -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": "리플", diff --git a/src/containers/Header/NetworkPicker/NetworkPicker.scss b/src/containers/Header/NetworkPicker/NetworkPicker.scss index cbcb3525f..dc6883df6 100644 --- a/src/containers/Header/NetworkPicker/NetworkPicker.scss +++ b/src/containers/Header/NetworkPicker/NetworkPicker.scss @@ -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 { diff --git a/src/containers/Header/NetworkPicker/NetworkPicker.tsx b/src/containers/Header/NetworkPicker/NetworkPicker.tsx index c9d12cb4e..aa8086f3c 100644 --- a/src/containers/Header/NetworkPicker/NetworkPicker.tsx +++ b/src/containers/Header/NetworkPicker/NetworkPicker.tsx @@ -18,7 +18,8 @@ const STATIC_ENV_LINKS: Record = { 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' diff --git a/src/containers/shared/NetworkContext.tsx b/src/containers/shared/NetworkContext.tsx index 9fe576148..1617a74d8 100644 --- a/src/containers/shared/NetworkContext.tsx +++ b/src/containers/shared/NetworkContext.tsx @@ -7,7 +7,8 @@ const ENV_NETWORK_MAP: Record = { testnet: 'test', devnet: 'dev', amm: 'amm-dev', - hooks_testnet: 'hooks-test', + xahau_mainnet: 'xahau-main', + xahau_testnet: 'xahau-test', } function getNetworkName() { diff --git a/src/containers/shared/css/variables.scss b/src/containers/shared/css/variables.scss index 9d619ac9c..a1987f372 100644 --- a/src/containers/shared/css/variables.scss +++ b/src/containers/shared/css/variables.scss @@ -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