Skip to content

Commit

Permalink
feat: remove tanglebay shimmer node from official nodes list
Browse files Browse the repository at this point in the history
  • Loading branch information
begonaalvarezd committed Jun 24, 2024
1 parent ed6e157 commit 65424d3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ export const OFFICIAL_NODE_URLS: Readonly<{ [key in NetworkId]?: string[] }> = {
[NetworkId.Iota]: ['https://api.stardust-mainnet.iotaledger.net', 'https://iota-node.tanglebay.com'],
[NetworkId.IotaTestnet]: ['https://api.testnet.iotaledger.net'],
[NetworkId.IotaAlphanet]: ['https://api.iota-alphanet.iotaledger.net'],
[NetworkId.Shimmer]: ['https://api.shimmer.network', 'https://shimmer-node.tanglebay.com'],
[NetworkId.Shimmer]: ['https://api.shimmer.network'],
[NetworkId.ShimmerTestnet]: ['https://api.testnet.shimmer.network'],
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
DEFAULT_CHAIN_CONFIGURATIONS,
DEFAULT_MAX_PARALLEL_API_REQUESTS,
getDefaultPersistedNetwork,
getOfficialNodes,
IIscpChainMetadata,
NetworkId,
} from '@core/network'
Expand Down Expand Up @@ -75,6 +76,7 @@ const persistedProfileMigrationsMap: Record<number, (existingProfile: unknown) =
16: persistedProfileMigrationToV17,
17: persistedProfileMigrationToV18,
18: persistedProfileMigrationToV19,
19: persistedProfileMigrationToV20,
}

function persistedProfileMigrationToV4(existingProfile: unknown): void {
Expand Down Expand Up @@ -352,3 +354,16 @@ function persistedProfileMigrationToV19(existingProfile: IPersistedProfile): voi
existingProfile.network.chains = newChains
saveProfile(existingProfile)
}

/*
* Migration 20
* Remove Tanglebay SMR node from the list of nodes.
*/
function persistedProfileMigrationToV20(existingProfile: IPersistedProfile): void {
const nodes = existingProfile.clientOptions.nodes ?? []
existingProfile.clientOptions.nodes = nodes.filter((node) => node.url !== 'https://shimmer-node.tanglebay.com')
if (!existingProfile.clientOptions.nodes?.length) {
existingProfile.clientOptions.nodes = getOfficialNodes(existingProfile.network.id)
}
saveProfile(existingProfile)
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const PROFILE_VERSION = 19
export const PROFILE_VERSION = 20

0 comments on commit 65424d3

Please sign in to comment.