Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove tanglebay shimmer node from official nodes list #8562

Merged
merged 3 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading