diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-04-02 20:33:01 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-04-02 20:33:01 +0530 |
commit | ef0acf06bfb7820a21c4719dba0d659f600be3c7 (patch) | |
tree | 216d34722240f682e5ee58632947fa75e9b4fcee /src/headless/helpers.ts | |
parent | 1728e5011e16f226c6e3675aa196872af39f6c4e (diff) | |
download | wallet-core-ef0acf06bfb7820a21c4719dba0d659f600be3c7.tar.xz |
model reserve history in the exchange, improve reserve handling logic
Diffstat (limited to 'src/headless/helpers.ts')
-rw-r--r-- | src/headless/helpers.ts | 6 |
1 files changed, 4 insertions, 2 deletions
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(); } |