diff options
Diffstat (limited to 'packages/taler-wallet-core/src/operations/testing.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/testing.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/taler-wallet-core/src/operations/testing.ts b/packages/taler-wallet-core/src/operations/testing.ts index 8c84702b8..ea373e914 100644 --- a/packages/taler-wallet-core/src/operations/testing.ts +++ b/packages/taler-wallet-core/src/operations/testing.ts @@ -450,7 +450,7 @@ export async function runIntegrationTest( logger.trace("integration test: all done!"); } -async function waitUntilDone(ws: InternalWalletState): Promise<void> { +export async function waitUntilDone(ws: InternalWalletState): Promise<void> { logger.info("waiting until all transactions are in a final state"); ws.ensureTaskLoopRunning(); let p: OpenedPromise<void> | undefined = undefined; @@ -459,11 +459,13 @@ async function waitUntilDone(ws: InternalWalletState): Promise<void> { return; } if (notif.type === NotificationType.TransactionStateTransition) { - p.resolve(); - } - // Work-around, refresh transactions don't properly emit transition notifications yet. - if (notif.type === NotificationType.PendingOperationProcessed) { - p.resolve(); + switch (notif.newTxState.major) { + case TransactionMajorState.Pending: + case TransactionMajorState.Aborting: + break; + default: + p.resolve(); + } } }); while (1) { |