From 39b0b2812342c625b12651f7f5387da0e15e84d3 Mon Sep 17 00:00:00 2001 From: Inokentii Mazhara Date: Thu, 19 Sep 2024 11:26:29 +0300 Subject: [PATCH] TW-1540: Remove Marigold mainnet (#1096) --- .github/workflows/apk-build.yml | 2 +- .github/workflows/testapp-build.yml | 6 ++++-- src/store/migrations.ts | 13 +++++++++++++ src/store/root-state.reducers.ts | 2 +- src/utils/rpc/rpc-list.ts | 1 - 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/apk-build.yml b/.github/workflows/apk-build.yml index 11634779f..78c45a2fe 100644 --- a/.github/workflows/apk-build.yml +++ b/.github/workflows/apk-build.yml @@ -75,7 +75,7 @@ jobs: run: yarn android:release:apk - name: Retain Android artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: path: android/app/build/outputs/apk/release/app-release.apk if-no-files-found: warn diff --git a/.github/workflows/testapp-build.yml b/.github/workflows/testapp-build.yml index 9a6988c8e..115e8bcca 100644 --- a/.github/workflows/testapp-build.yml +++ b/.github/workflows/testapp-build.yml @@ -85,8 +85,9 @@ jobs: run: yarn android:release:apk - name: Retain Android artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: + name: android path: android/app/build/outputs/apk/release/app-release.apk if-no-files-found: warn retention-days: 30 @@ -140,8 +141,9 @@ jobs: team-id: ${{ secrets.TEAM_ID }} - name: Retain iOS artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: + name: ios path: ios/build/TempleWallet.ipa if-no-files-found: warn retention-days: 30 diff --git a/src/store/migrations.ts b/src/store/migrations.ts index 5b28f1e41..a43af2fca 100644 --- a/src/store/migrations.ts +++ b/src/store/migrations.ts @@ -1,3 +1,4 @@ +import { isEqual } from 'lodash-es'; import type { MigrationManifest, PersistedState } from 'redux-persist'; import { VisibilityEnum } from 'src/enums/visibility.enum'; @@ -153,5 +154,17 @@ export const MIGRATIONS: MigrationManifest = { accountsStateRecord } }; + }, + '6': (untypedState: PersistedState): undefined | TypedPersistedRootState => { + if (!untypedState) { + return untypedState; + } + const state = untypedState as TypedPersistedRootState; + state.settings.rpcList = state.settings.rpcList.filter(({ name, url }) => !isEqual({ name, url }, MARIGOLD_RPC)); + if (state.settings.selectedRpcUrl === MARIGOLD_RPC.url) { + state.settings.selectedRpcUrl = TEMPLE_RPC.url; + } + + return state; } }; diff --git a/src/store/root-state.reducers.ts b/src/store/root-state.reducers.ts index ffdbd3d5c..7a98178ca 100644 --- a/src/store/root-state.reducers.ts +++ b/src/store/root-state.reducers.ts @@ -45,7 +45,7 @@ const persistConfigBlacklist: (keyof RootState)[] = [ const persistConfig: PersistConfig = { key: 'root', - version: 5, + version: 6, storage: SlicedAsyncStorage, stateReconciler: autoMergeLevel2, writeFailHandler: persistFailHandler, diff --git a/src/utils/rpc/rpc-list.ts b/src/utils/rpc/rpc-list.ts index a97dff917..dd472eb33 100644 --- a/src/utils/rpc/rpc-list.ts +++ b/src/utils/rpc/rpc-list.ts @@ -19,7 +19,6 @@ export const OLD_TEMPLE_RPC_URLS = ['https://mainnet-node.madfish.solutions', 'h export const RpcList: RpcInterface[] = [ TEMPLE_RPC, - MARIGOLD_RPC, { name: 'SmartPy Mainnet', url: 'https://mainnet.smartpy.io'