Skip to content

Commit

Permalink
Add lightMode option to makeCurrencyEngine
Browse files Browse the repository at this point in the history
The memory wallet is temporary that just needs to get balances and spend. An engine recognizing lightMode can reduce unnecessary operations like transaction history
  • Loading branch information
peachbits committed Jul 22, 2024
1 parent da26b51 commit 415ac8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/core/account/memory-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export const makeMemoryWalletInner = async (
},
customTokens: { ...config.customTokens },
enabledTokenIds: [...Object.keys(config.allTokens)],
lightMode: true,
log,
userSettings: { ...(config.userSettings ?? {}) },
walletLocalDisklet: makeMemoryDisklet(),
Expand Down
1 change: 1 addition & 0 deletions src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,7 @@ export interface EdgeCurrencyEngineCallbacks {

export interface EdgeCurrencyEngineOptions {
callbacks: EdgeCurrencyEngineCallbacks
lightMode?: boolean // Flag indicating that the engine only needs to sync the balance and be able to spend

// Wallet-scoped IO objects:
log: EdgeLog
Expand Down

0 comments on commit 415ac8b

Please sign in to comment.