Skip to content

Commit

Permalink
chore: update shimmer and iota nodes (#7526)
Browse files Browse the repository at this point in the history
* chore: update shimmer and iota nodes

* chore: add tanglebay node

* fix tests

---------

Co-authored-by: cpl121 <[email protected]>
  • Loading branch information
begonaalvarezd and cpl121 authored Oct 4, 2023
1 parent 0411169 commit a626c50
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { NetworkId } from '../enums'

export const OFFICIAL_NODE_URLS: Readonly<{ [key in NetworkId]?: string[] }> = {
[NetworkId.Iota]: ['https://api.stardust-mainnet.iotaledger.net:8443'],
[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'],
[NetworkId.Shimmer]: ['https://api.shimmer.network', 'https://shimmer-node.tanglebay.com'],
[NetworkId.Testnet]: ['https://api.testnet.shimmer.network'],
}
9 changes: 6 additions & 3 deletions packages/shared/lib/core/network/tests/network.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ describe('File: network.ts', () => {
}

const EXPECTED_NODE_URLS: Readonly<{ [key in NetworkId]?: string[] }> = {
[NetworkId.Iota]: ['https://api.stardust-mainnet.iotaledger.net:8443'],
[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'],
[NetworkId.Shimmer]: ['https://api.shimmer.network', 'https://shimmer-node.tanglebay.com'],
[NetworkId.Testnet]: ['https://api.testnet.shimmer.network'],
}

Expand All @@ -39,7 +39,10 @@ describe('File: network.ts', () => {
it('should return the client options of the active profile if present', () => {
const clientOptions = getDefaultClientOptions(NetworkId.Iota)
expect(clientOptions).toEqual(<ClientOptions>{
nodes: [_buildNode(EXPECTED_NODE_URLS?.[NetworkId.Iota]?.[0])],
nodes: [
_buildNode(EXPECTED_NODE_URLS?.[NetworkId.Iota]?.[0]),
_buildNode(EXPECTED_NODE_URLS?.[NetworkId.Iota]?.[1]),
],
maxParallelApiRequests: DEFAULT_MAX_PARALLEL_API_REQUESTS,
})
})
Expand Down

0 comments on commit a626c50

Please sign in to comment.