diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-08-20 23:36:56 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-08-20 23:36:56 +0200 |
commit | d76bc2a03d3f9ccf9c9cf142bcb03c96bb40ddb5 (patch) | |
tree | 83d3ce6ca77fef8bc5c6d21b03c845637210fcd7 /src/headless | |
parent | 106bc6ad9a78c199e6b0e89bef854174d9014c28 (diff) | |
download | wallet-core-d76bc2a03d3f9ccf9c9cf142bcb03c96bb40ddb5.tar.xz |
more android helpers
Diffstat (limited to 'src/headless')
-rw-r--r-- | src/headless/helpers.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/headless/helpers.ts b/src/headless/helpers.ts index 5636b3921..7c4fa8777 100644 --- a/src/headless/helpers.ts +++ b/src/headless/helpers.ts @@ -106,7 +106,7 @@ export class NodeHttpLib implements HttpRequestLibrary { } } -interface DefaultNodeWalletArgs { +export interface DefaultNodeWalletArgs { /** * Location of the wallet database. * @@ -155,6 +155,10 @@ export async function getDefaultNodeWallet( } myBackend.afterCommitCallback = async () => { + // Allow caller to stop persisting the wallet. + if (args.persistentStoragePath === undefined) { + return; + } const dbContent = myBackend.exportDump(); fs.writeFileSync(storagePath, JSON.stringify(dbContent, undefined, 2), { encoding: "utf-8" }); }; |