diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-12-03 00:52:15 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-12-03 00:52:15 +0100 |
commit | c33dd75711a39403bd4dd9940caab6d5e6ad2d77 (patch) | |
tree | 7d7d9c64b5074a8f533302add3b1674c5d424c8d /src/android | |
parent | a5137c32650b0b9aa2abbe55e4f4f3f60ed78e07 (diff) |
pending operations (pay/proposals)
Diffstat (limited to 'src/android')
-rw-r--r-- | src/android/index.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/android/index.ts b/src/android/index.ts index 711441769..fb62a5b5a 100644 --- a/src/android/index.ts +++ b/src/android/index.ts @@ -200,9 +200,11 @@ export function installAndroidWalletListener() { const wallet = await wp.promise; wallet.stop(); wp = openPromise<Wallet>(); - if (walletArgs && walletArgs.persistentStoragePath) { + const oldArgs = walletArgs; + walletArgs = { ...oldArgs }; + if (oldArgs && oldArgs.persistentStoragePath) { try { - fs.unlinkSync(walletArgs.persistentStoragePath); + fs.unlinkSync(oldArgs.persistentStoragePath); } catch (e) { console.error("Error while deleting the wallet db:", e); } @@ -210,6 +212,12 @@ export function installAndroidWalletListener() { walletArgs.persistentStoragePath = undefined; } maybeWallet = undefined; + const w = await getDefaultNodeWallet(walletArgs); + maybeWallet = w; + w.runLoopScheduledRetries().catch((e) => { + console.error("Error during wallet retry loop", e); + }); + wp.resolve(w); break; } default: |