From c2df8c8b30cab948bffbfa44d49201675741f7bd Mon Sep 17 00:00:00 2001 From: Dmitriy Kudasov Date: Tue, 26 Nov 2024 10:19:34 +0300 Subject: [PATCH] Restore storage for Provider and ProviderConfig --- src/models/provider/provider-config.ts | 3 +++ src/models/provider/provider.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/models/provider/provider-config.ts b/src/models/provider/provider-config.ts index d95e79a9b..e54fd4bb6 100644 --- a/src/models/provider/provider-config.ts +++ b/src/models/provider/provider-config.ts @@ -3,6 +3,7 @@ import {makePersistable} from 'mobx-persist-store'; import {Indexer} from '@app/services/indexer'; import {ProviderConfig} from '@app/services/indexer/indexer.types'; +import {storage} from '@app/services/mmkv'; import {ChainId} from '@app/types'; import {Provider} from './provider'; @@ -17,6 +18,8 @@ class ProviderConfigStore { makePersistable(this, { name: this.constructor.name, properties: ['_data'] as (keyof this)[], + // FIXME: configurePersistable didn't define yet there because of circular dependencies issue + storage, }); } diff --git a/src/models/provider/provider.ts b/src/models/provider/provider.ts index 7f550c8f8..8b3ea3ade 100644 --- a/src/models/provider/provider.ts +++ b/src/models/provider/provider.ts @@ -8,6 +8,7 @@ import {hideModal, showModal} from '@app/helpers'; import {awaitForEventDone} from '@app/helpers/await-for-event-done'; import {EthRpcEndpointAvailability} from '@app/helpers/eth-rpc-endpoint-availability'; import {Backend, NetworkProvider} from '@app/services/backend'; +import {storage} from '@app/services/mmkv'; import {WalletConnect} from '@app/services/wallet-connect'; import {ModalType} from '@app/types'; import {createAsyncTask, sleep} from '@app/utils'; @@ -59,6 +60,8 @@ class ProviderStore { makePersistable(this, { name: this.constructor.name, properties: ['_selectedProviderId', '_data'], + // FIXME: configurePersistable didn't define yet there because of circular dependencies issue + storage, }); }