Skip to content

Commit

Permalink
Set "Require graph sync" enabled by default
Browse files Browse the repository at this point in the history
This includes already created wallets.
  • Loading branch information
hsjoberg committed Feb 15, 2024
1 parent 5cf1295 commit 6b41fd4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/migration/app-migration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,4 +352,10 @@ export const appMigration: IAppMigration[] = [
}
},
},
// Version 40
{
async beforeLnd(db, i) {
setItemObject<boolean>(StorageItem.requireGraphSync, true);
},
},
];
2 changes: 1 addition & 1 deletion src/state/Settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export const settings: ISettingsModel = {
actions.setBitcoindPubRawBlock((await getItem(StorageItem.bitcoindPubRawBlock)) ?? "");
actions.setBitcoindPubRawTx((await getItem(StorageItem.bitcoindPubRawTx)) ?? "");
actions.setDunderServer((await getItem(StorageItem.dunderServer)) ?? "");
actions.setRequireGraphSync((await getItemObject(StorageItem.requireGraphSync)) ?? false);
actions.setRequireGraphSync((await getItemObject(StorageItem.requireGraphSync)) ?? true);
actions.setDunderEnabled((await getItemObject(StorageItem.dunderEnabled)) ?? true);
actions.setLndNoGraphCache((await getItemObject(StorageItem.lndNoGraphCache)) ?? false);
actions.setInvoiceExpiry(
Expand Down
2 changes: 1 addition & 1 deletion src/storage/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export const setupApp = async () => {
setItem(StorageItem.bitcoindPubRawBlock, bitcoindPubRawBlock),
setItem(StorageItem.bitcoindPubRawTx, bitcoindPubRawTx),
setItem(StorageItem.dunderServer, DEFAULT_DUNDER_SERVER),
setItemObject<boolean>(StorageItem.requireGraphSync, false),
setItemObject<boolean>(StorageItem.requireGraphSync, true),
setItemObject<boolean>(StorageItem.dunderEnabled, true),
setItemObject<boolean>(StorageItem.lndNoGraphCache, false),
setItemObject<number>(StorageItem.invoiceExpiry, DEFAULT_INVOICE_EXPIRY),
Expand Down

0 comments on commit 6b41fd4

Please sign in to comment.