From ef0acf06bfb7820a21c4719dba0d659f600be3c7 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 2 Apr 2020 20:33:01 +0530 Subject: model reserve history in the exchange, improve reserve handling logic --- src/headless/helpers.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/headless/helpers.ts') diff --git a/src/headless/helpers.ts b/src/headless/helpers.ts index fb3d800d4..92452e78f 100644 --- a/src/headless/helpers.ts +++ b/src/headless/helpers.ts @@ -35,6 +35,7 @@ import { Database } from "../util/query"; import { NodeHttpLib } from "./NodeHttpLib"; import { Logger } from "../util/logging"; import { SynchronousCryptoWorkerFactory } from "../crypto/workers/synchronousWorker"; +import { WithdrawalSourceType } from "../types/dbTypes"; const logger = new Logger("helpers.ts"); @@ -165,8 +166,9 @@ export async function withdrawTestBalance( }); myWallet.addNotificationListener((n) => { if ( - n.type === NotificationType.ReserveDepleted && - n.reservePub === reservePub + n.type === NotificationType.WithdrawGroupFinished && + n.withdrawalSource.type === WithdrawalSourceType.Reserve && + n.withdrawalSource.reservePub === reservePub ) { resolve(); } -- cgit v1.2.3