diff options
author | Florian Dold <florian@dold.me> | 2023-02-20 00:36:02 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-02-20 00:38:24 +0100 |
commit | 30b3949d2bd9da6bceddb40f3d1921b95fa80316 (patch) | |
tree | 6163df600f17eadc94f7f3e51cc220bc8122ee8a /packages/taler-wallet-core/src/wallet.ts | |
parent | e6ed901626a5219a1d091f4f41654365d2c29531 (diff) | |
download | wallet-core-30b3949d2bd9da6bceddb40f3d1921b95fa80316.tar.xz |
wallet-core: pending operation for peer push credit, save withdrawalGroupId
Diffstat (limited to 'packages/taler-wallet-core/src/wallet.ts')
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index cbf11d84e..e3a34f0da 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -197,15 +197,16 @@ import { import { acceptIncomingPeerPullPayment, acceptPeerPushPayment, - prepareIncomingPeerPullPayment, - checkPeerPushPayment, + preparePeerPullCredit, + preparePeerPushCredit, initiatePeerPullPayment, initiatePeerPushPayment, checkPeerPullPaymentInitiation, preparePeerPushPayment, - processPeerPullInitiation, + processPeerPullCredit, processPeerPushInitiation, processPeerPullDebit, + processPeerPushCredit, } from "./operations/pay-peer.js"; import { getPendingOperations } from "./operations/pending.js"; import { @@ -328,9 +329,11 @@ async function callOperationHandler( case PendingTaskType.PeerPushInitiation: return await processPeerPushInitiation(ws, pending.pursePub); case PendingTaskType.PeerPullInitiation: - return await processPeerPullInitiation(ws, pending.pursePub); + return await processPeerPullCredit(ws, pending.pursePub); case PendingTaskType.PeerPullDebit: return await processPeerPullDebit(ws, pending.peerPullPaymentIncomingId); + case PendingTaskType.PeerPushCredit: + return await processPeerPushCredit(ws, pending.peerPushPaymentIncomingId); default: return assertUnreachable(pending); } @@ -1435,7 +1438,7 @@ async function dispatchRequestInternal<Op extends WalletApiOperation>( } case WalletApiOperation.CheckPeerPushPayment: { const req = codecForCheckPeerPushPaymentRequest().decode(payload); - return await checkPeerPushPayment(ws, req); + return await preparePeerPushCredit(ws, req); } case WalletApiOperation.AcceptPeerPushPayment: { const req = codecForAcceptPeerPushPaymentRequest().decode(payload); @@ -1451,7 +1454,7 @@ async function dispatchRequestInternal<Op extends WalletApiOperation>( } case WalletApiOperation.CheckPeerPullPayment: { const req = codecForCheckPeerPullPaymentRequest().decode(payload); - return await prepareIncomingPeerPullPayment(ws, req); + return await preparePeerPullCredit(ws, req); } case WalletApiOperation.AcceptPeerPullPayment: { const req = codecForAcceptPeerPullPaymentRequest().decode(payload); |