diff options
author | Florian Dold <florian@dold.me> | 2023-05-05 10:56:42 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-05-05 13:21:58 +0200 |
commit | 60805f3ff88d7ecd149a88ec7cea846384155c5b (patch) | |
tree | 0767a7ed20c4879ab35447039fd7e3be8fdecb94 /packages/taler-wallet-core/src/wallet.ts | |
parent | 1b0bec0363793996eff6483d36b844cfa2381404 (diff) | |
download | wallet-core-60805f3ff88d7ecd149a88ec7cea846384155c5b.tar.xz |
DD37 wip
Diffstat (limited to 'packages/taler-wallet-core/src/wallet.ts')
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 733c239f9..ed174e33b 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -208,7 +208,7 @@ import { processPeerPullCredit, processPeerPullDebit, processPeerPushCredit, - processPeerPushInitiation, + processPeerPushDebit, } from "./operations/pay-peer.js"; import { getPendingOperations } from "./operations/pending.js"; import { @@ -314,9 +314,9 @@ async function callOperationHandler( } case PendingTaskType.Backup: return await processBackupForProvider(ws, pending.backupProviderBaseUrl); - case PendingTaskType.PeerPushInitiation: - return await processPeerPushInitiation(ws, pending.pursePub); - case PendingTaskType.PeerPullInitiation: + case PendingTaskType.PeerPushDebit: + return await processPeerPushDebit(ws, pending.pursePub); + case PendingTaskType.PeerPullCredit: return await processPeerPullCredit(ws, pending.pursePub); case PendingTaskType.PeerPullDebit: return await processPeerPullDebit(ws, pending.peerPullPaymentIncomingId); @@ -439,7 +439,7 @@ async function runTaskLoop( }); // Wait until either the timeout, or we are notified (via the latch) // that more work might be available. - await Promise.race([timeout, ws.latch.wait()]); + await Promise.race([timeout, ws.workAvailable.wait()]); } else { logger.trace( `running ${pending.pendingOperations.length} pending operations`, @@ -1659,7 +1659,7 @@ class InternalWalletStateImpl implements InternalWalletState { merchantInfoCache: Record<string, MerchantInfo> = {}; readonly timerGroup: TimerGroup; - latch = new AsyncCondition(); + workAvailable = new AsyncCondition(); stopped = false; listeners: NotificationListener[] = []; |