aboutsummaryrefslogtreecommitdiff
path: root/src/headless
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-03-23 17:33:38 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-03-23 17:33:38 +0530
commit1b0b3f146c829caf04a42984d1a09a7c80b867c4 (patch)
tree06ff963059ab189b4f612bb1fb178578bd98ad95 /src/headless
parent0e51d45ec0db938d86a266d884333d5ee7743689 (diff)
make sure the 'testing withdraw' subcommand does retries
Diffstat (limited to 'src/headless')
-rw-r--r--src/headless/helpers.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/headless/helpers.ts b/src/headless/helpers.ts
index 0f690f26a..dc56a9876 100644
--- a/src/headless/helpers.ts
+++ b/src/headless/helpers.ts
@@ -158,6 +158,9 @@ export async function withdrawTestBalance(
]);
const donePromise = new Promise((resolve, reject) => {
+ myWallet.runRetryLoop().catch((x) => {
+ reject(x);
+ });
myWallet.addNotificationListener(n => {
if (
n.type === NotificationType.ReserveDepleted &&
@@ -169,7 +172,6 @@ export async function withdrawTestBalance(
});
await bank.createReserve(bankUser, amount, reservePub, exchangePaytoUri);
-
await myWallet.confirmReserve({ reservePub: reserveResponse.reservePub });
await donePromise;
}