From 829acdd3d98f1014747f15ecb619b6fbaa06b640 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 3 Dec 2019 14:40:05 +0100 Subject: android --- src/android/index.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/android') 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(); 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(); 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: -- cgit v1.2.3