Skip to content

Commit

Permalink
Merge pull request #2854 from myxmaster/require_cycle_migration_utils
Browse files Browse the repository at this point in the history
Fix require cycle in MigrationUtils
  • Loading branch information
kaloudis authored Feb 18, 2025
2 parents cd52b0d + c797457 commit 4cc4fc0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions utils/MigrationUtils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import stores from '../stores/Stores';
import { settingsStore } from '../stores/storeInstances';
import {
Settings,
DEFAULT_FIAT_RATES_SOURCE,
Expand Down Expand Up @@ -124,7 +124,7 @@ class MigrationsUtils {
const mod = await EncryptedStorage.getItem(MOD_KEY);
if (!mod) {
newSettings.requestSimpleTaproot = true;
stores.settingsStore.setSettings(JSON.stringify(newSettings));
settingsStore.setSettings(JSON.stringify(newSettings));
await EncryptedStorage.setItem(MOD_KEY, 'true');
}

Expand All @@ -137,7 +137,7 @@ class MigrationsUtils {
if (newSettings?.lspTestnet === 'https://testnet-lsp.lnolymp.us') {
newSettings.lspTestnet = DEFAULT_LSP_TESTNET;
}
stores.settingsStore.setSettings(JSON.stringify(newSettings));
settingsStore.setSettings(JSON.stringify(newSettings));
await EncryptedStorage.setItem(MOD_KEY2, 'true');
}

Expand All @@ -158,7 +158,7 @@ class MigrationsUtils {
newSettings.neutrinoPeersMainnet =
DEFAULT_NEUTRINO_PEERS_MAINNET;
}
stores.settingsStore.setSettings(JSON.stringify(newSettings));
settingsStore.setSettings(JSON.stringify(newSettings));
await EncryptedStorage.setItem(MOD_KEY3, 'true');
}

Expand Down Expand Up @@ -192,7 +192,7 @@ class MigrationsUtils {
newSettings.lsps1ShowPurchaseButton = true;
}

stores.settingsStore.setSettings(JSON.stringify(newSettings));
settingsStore.setSettings(JSON.stringify(newSettings));
await EncryptedStorage.setItem(MOD_KEY4, 'true');
}

Expand All @@ -209,7 +209,7 @@ class MigrationsUtils {
}
}

stores.settingsStore.setSettings(JSON.stringify(newSettings));
settingsStore.setSettings(JSON.stringify(newSettings));
await EncryptedStorage.setItem(MOD_KEY5, 'true');
}

Expand All @@ -221,7 +221,7 @@ class MigrationsUtils {
newSettings.customSpeedloader = '';
}

stores.settingsStore.setSettings(JSON.stringify(newSettings));
settingsStore.setSettings(JSON.stringify(newSettings));
await EncryptedStorage.setItem(MOD_KEY6, 'true');
}

Expand All @@ -234,7 +234,7 @@ class MigrationsUtils {
newSettings.bimodalPathfinding = false;
}

stores.settingsStore.setSettings(JSON.stringify(newSettings));
settingsStore.setSettings(JSON.stringify(newSettings));
await EncryptedStorage.setItem(MOD_KEY7, 'true');
}

Expand All @@ -248,7 +248,7 @@ class MigrationsUtils {
newSettings.lightningAddress.nostrRelays = DEFAULT_NOSTR_RELAYS;
}

stores.settingsStore.setSettings(JSON.stringify(newSettings));
settingsStore.setSettings(JSON.stringify(newSettings));
await EncryptedStorage.setItem(MOD_KEY8, 'true');
}

Expand Down

0 comments on commit 4cc4fc0

Please sign in to comment.