From a786d94d1d8de0bb8411a3e9eb1a84e15cf86ccb Mon Sep 17 00:00:00 2001 From: AnhMTV Date: Fri, 31 May 2024 18:56:51 +0700 Subject: [PATCH] Update token, network before Karura Campaign --- .../scripts/BeforeKaruraCampaign.ts | 13 +++++++++++++ .../src/services/migration-service/scripts/index.ts | 6 ++---- 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 packages/extension-base/src/services/migration-service/scripts/BeforeKaruraCampaign.ts diff --git a/packages/extension-base/src/services/migration-service/scripts/BeforeKaruraCampaign.ts b/packages/extension-base/src/services/migration-service/scripts/BeforeKaruraCampaign.ts new file mode 100644 index 0000000000..ca2c6cd560 --- /dev/null +++ b/packages/extension-base/src/services/migration-service/scripts/BeforeKaruraCampaign.ts @@ -0,0 +1,13 @@ +// Copyright 2019-2022 @subwallet/extension-koni authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import BaseMigrationJob from '@subwallet/extension-base/services/migration-service/Base'; + +export default class BeforeKaruraCampaign extends BaseMigrationJob { + public override async run (): Promise { + const state = this.state; + + state.chainService.disableChain('goldberg_testnet'); + await state.chainService.updateAssetSetting('karura-NATIVE-KAR', { visible: true }); + } +} diff --git a/packages/extension-base/src/services/migration-service/scripts/index.ts b/packages/extension-base/src/services/migration-service/scripts/index.ts index a9ac62d86c..18008246a1 100644 --- a/packages/extension-base/src/services/migration-service/scripts/index.ts +++ b/packages/extension-base/src/services/migration-service/scripts/index.ts @@ -1,7 +1,7 @@ // Copyright 2019-2022 @subwallet/extension-koni authors & contributors // SPDX-License-Identifier: Apache-2.0 -import EnableAvailGoldberg from '@subwallet/extension-base/services/migration-service/scripts/EnableAvailGoldberg'; +import BeforeKaruraCampaign from '@subwallet/extension-base/services/migration-service/scripts/BeforeKaruraCampaign'; import BaseMigrationJob from '../Base'; @@ -32,7 +32,5 @@ export default >{ // '1.1.44-01': MigrateAssetSetting, // '1.1.45-01': MigrateTransactionHistoryBySymbol, // '1.1.46-01': AutoEnableSomeTokens - '1.1.51-01': EnableAvailGoldberg - // [`${EVERYTIME}-1.1.42-02`]: MigrateTransactionHistoryBySymbol - // [`${EVERYTIME}-1`]: AutoEnableChainsTokens + '1.1.51-03': BeforeKaruraCampaign };