diff --git a/src/migration/app-migration.ts b/src/migration/app-migration.ts index 1376871f3..9ecf8ea2e 100644 --- a/src/migration/app-migration.ts +++ b/src/migration/app-migration.ts @@ -256,4 +256,10 @@ export const appMigration: IAppMigration[] = [ await db.executeSql("ALTER TABLE tx ADD lud16IdentifierMimeType TEXT NULL"); }, }, + // Version 29 + { + async beforeLnd(db, i) { + setItemObject(StorageItem.lndNoGraphCache, false); + }, + }, ]; diff --git a/src/state/index.ts b/src/state/index.ts index de6659636..79a18a790 100644 --- a/src/state/index.ts +++ b/src/state/index.ts @@ -403,7 +403,7 @@ export const model: IStoreModel = { const bitcoindRpcPass = await getItemAsyncStorage(StorageItem.bitcoindRpcPass) || null; const bitcoindPubRawBlock = await getItemAsyncStorage(StorageItem.bitcoindPubRawBlock) || null; const bitcoindPubRawTx = await getItemAsyncStorage(StorageItem.bitcoindPubRawTx) || null; - const lndNoGraphCache = getState().settings.lndNoGraphCache; + const lndNoGraphCache = await getItemAsyncStorage(StorageItem.lndNoGraphCache) || "0"; const nodeBackend = lndChainBackend === "neutrino" ? "neutrino" : "bitcoind"; diff --git a/src/storage/app.ts b/src/storage/app.ts index ddd87ab50..d896df40a 100644 --- a/src/storage/app.ts +++ b/src/storage/app.ts @@ -210,7 +210,7 @@ export const setupApp = async () => { setItemObject(StorageItem.requireGraphSync, false), setItemObject(StorageItem.dunderEnabled, false), setItemObject(StorageItem.lndNoGraphCache, false), - setItemObject(StorageItem.lndNoGraphCache, DEFAULT_INVOICE_EXPIRY), + setItemObject(StorageItem.invoiceExpiry, DEFAULT_INVOICE_EXPIRY), setItemObject(StorageItem.rescanWallet, false), ]); };