From 25800c595e5affc5832f4a360e7f9d713185170a Mon Sep 17 00:00:00 2001 From: Marc Espin Date: Mon, 13 May 2024 12:56:37 +0200 Subject: [PATCH] chore: update node and faucet urls for nova testnet (#8514) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Update Node and Faucet URLs * fix: Update test * chore: Update getNetworkIdFromNetworkName * chore: Update getNetworkIdFromNetworkName again * Update packages/shared/lib/core/network/constants/faucet-urls.constant.ts Co-authored-by: Begoña Álvarez de la Cruz * Update packages/shared/lib/core/network/tests/network.test.ts Co-authored-by: Begoña Álvarez de la Cruz * Update packages/shared/lib/core/network/constants/explorer-urls.constant.ts Co-authored-by: Begoña Álvarez de la Cruz * fix the test. --------- Co-authored-by: cpl121 <100352899+cpl121@users.noreply.github.com> Co-authored-by: Begoña Álvarez de la Cruz --- .../shared/lib/core/network/constants/explorer-urls.constant.ts | 2 +- .../shared/lib/core/network/constants/faucet-urls.constant.ts | 2 +- .../lib/core/network/constants/official-node-urls.constant.ts | 2 +- packages/shared/lib/core/network/tests/network.test.ts | 2 +- .../lib/core/network/utils/getNetworkIdFromNetworkName.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/shared/lib/core/network/constants/explorer-urls.constant.ts b/packages/shared/lib/core/network/constants/explorer-urls.constant.ts index 14df9fdf839..8f56e62f17e 100644 --- a/packages/shared/lib/core/network/constants/explorer-urls.constant.ts +++ b/packages/shared/lib/core/network/constants/explorer-urls.constant.ts @@ -4,5 +4,5 @@ export const EXPLORER_URLS: Readonly<{ [key in NetworkId]?: string }> = { [NetworkId.Iota]: 'https://explorer.iota.org/mainnet', [NetworkId.IotaAlphanet]: 'https://explorer.iota-alphanet.iotaledger.net/devnet', [NetworkId.Shimmer]: 'https://explorer.shimmer.network/shimmer', - [NetworkId.Testnet]: 'https://explorer.shimmer.network/testnet', + [NetworkId.Testnet]: 'https://explorer.iota.works/iota2-testnet', } diff --git a/packages/shared/lib/core/network/constants/faucet-urls.constant.ts b/packages/shared/lib/core/network/constants/faucet-urls.constant.ts index 44079b99fd3..879ba147c72 100644 --- a/packages/shared/lib/core/network/constants/faucet-urls.constant.ts +++ b/packages/shared/lib/core/network/constants/faucet-urls.constant.ts @@ -2,5 +2,5 @@ import { NetworkId } from '../enums' export const FAUCET_URLS: Readonly<{ [key in NetworkId]?: string }> = { [NetworkId.IotaAlphanet]: 'https://faucet.iota-alphanet.iotaledger.net/api/enqueue', - [NetworkId.Testnet]: 'https://faucet.testnet.shimmer.network/api/enqueue', + [NetworkId.Testnet]: 'https://faucet.nova-testnet.iotaledger.net/api/enqueue', } diff --git a/packages/shared/lib/core/network/constants/official-node-urls.constant.ts b/packages/shared/lib/core/network/constants/official-node-urls.constant.ts index f4674b99460..65f86d3a5d7 100644 --- a/packages/shared/lib/core/network/constants/official-node-urls.constant.ts +++ b/packages/shared/lib/core/network/constants/official-node-urls.constant.ts @@ -4,5 +4,5 @@ export const OFFICIAL_NODE_URLS: Readonly<{ [key in NetworkId]?: string[] }> = { [NetworkId.Iota]: ['https://api.stardust-mainnet.iotaledger.net', 'https://iota-node.tanglebay.com'], [NetworkId.IotaAlphanet]: ['https://api.iota-alphanet.iotaledger.net'], [NetworkId.Shimmer]: ['https://api.shimmer.network', 'https://shimmer-node.tanglebay.com'], - [NetworkId.Testnet]: ['https://api.testnet.shimmer.network'], + [NetworkId.Testnet]: ['https://api.nova-testnet.iotaledger.net/'], } diff --git a/packages/shared/lib/core/network/tests/network.test.ts b/packages/shared/lib/core/network/tests/network.test.ts index 920e6416a4c..d84355d33f9 100644 --- a/packages/shared/lib/core/network/tests/network.test.ts +++ b/packages/shared/lib/core/network/tests/network.test.ts @@ -24,7 +24,7 @@ describe('File: network.ts', () => { [NetworkId.Iota]: ['https://api.stardust-mainnet.iotaledger.net', 'https://iota-node.tanglebay.com'], [NetworkId.IotaAlphanet]: ['https://api.iota-alphanet.iotaledger.net'], [NetworkId.Shimmer]: ['https://api.shimmer.network', 'https://shimmer-node.tanglebay.com'], - [NetworkId.Testnet]: ['https://api.testnet.shimmer.network'], + [NetworkId.Testnet]: ['https://api.nova-testnet.iotaledger.net/'], } const EXPECTED_NODES: Readonly<{ [key in NetworkId]: (INode | undefined)[] }> = { diff --git a/packages/shared/lib/core/network/utils/getNetworkIdFromNetworkName.ts b/packages/shared/lib/core/network/utils/getNetworkIdFromNetworkName.ts index 04e990c4b4a..99854d97811 100644 --- a/packages/shared/lib/core/network/utils/getNetworkIdFromNetworkName.ts +++ b/packages/shared/lib/core/network/utils/getNetworkIdFromNetworkName.ts @@ -1,7 +1,7 @@ import { NetworkId } from '../enums' export function getNetworkIdFromNetworkName(networkName: string): NetworkId { - if (networkName.startsWith('iota2-alphanet')) { + if (networkName.startsWith('nova-testnet')) { return NetworkId.Testnet } switch (networkName) {