diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-12-03 14:40:05 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-12-03 14:40:05 +0100 |
commit | 829acdd3d98f1014747f15ecb619b6fbaa06b640 (patch) | |
tree | 2b95c7ee2df1d3cc8277d0b684300f79d05c2264 /src/android/index.ts | |
parent | 8683c93613caa4047c4fd874aefb0b7d35fdc038 (diff) | |
download | wallet-core-829acdd3d98f1014747f15ecb619b6fbaa06b640.tar.xz |
android
Diffstat (limited to 'src/android/index.ts')
-rw-r--r-- | src/android/index.ts | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/android/index.ts b/src/android/index.ts index fb62a5b5a..4d0136ecf 100644 --- a/src/android/index.ts +++ b/src/android/index.ts @@ -157,6 +157,7 @@ export function installAndroidWalletListener() { case "withdrawTestkudos": { const wallet = await wp.promise; await withdrawTestBalance(wallet); + result = {}; break; } case "getHistory": { @@ -164,6 +165,12 @@ export function installAndroidWalletListener() { result = await wallet.getHistory(); break; } + case "retryPendingNow": { + const wallet = await wp.promise; + await wallet.runPending(true); + result = {}; + break; + } case "preparePay": { const wallet = await wp.promise; result = await wallet.preparePay(msg.args.url); @@ -197,9 +204,6 @@ export function installAndroidWalletListener() { break; } case "reset": { - const wallet = await wp.promise; - wallet.stop(); - wp = openPromise<Wallet>(); const oldArgs = walletArgs; walletArgs = { ...oldArgs }; if (oldArgs && oldArgs.persistentStoragePath) { @@ -211,6 +215,9 @@ export function installAndroidWalletListener() { // Prevent further storage! walletArgs.persistentStoragePath = undefined; } + const wallet = await wp.promise; + wallet.stop(); + wp = openPromise<Wallet>(); maybeWallet = undefined; const w = await getDefaultNodeWallet(walletArgs); maybeWallet = w; @@ -218,6 +225,7 @@ export function installAndroidWalletListener() { console.error("Error during wallet retry loop", e); }); wp.resolve(w); + result = {}; break; } default: |