aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pay-peer-pull-credit.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-06-20 11:40:06 +0200
committerFlorian Dold <florian@dold.me>2023-06-20 11:40:06 +0200
commit9c708251f92e6691ebba80fa8d129c6c04cec618 (patch)
treeedf46c7b3f9386697a4ea697c2d66f66323a6d3e /packages/taler-wallet-core/src/operations/pay-peer-pull-credit.ts
parent54f0c82999833132baf83995526025ac56d6fe06 (diff)
downloadwallet-core-9c708251f92e6691ebba80fa8d129c6c04cec618.tar.xz
wallet-core: emit DD37 self-transition notifications with errors
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay-peer-pull-credit.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/pay-peer-pull-credit.ts27
1 files changed, 2 insertions, 25 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-peer-pull-credit.ts b/packages/taler-wallet-core/src/operations/pay-peer-pull-credit.ts
index 48b81d6c2..5baba8cdc 100644
--- a/packages/taler-wallet-core/src/operations/pay-peer-pull-credit.ts
+++ b/packages/taler-wallet-core/src/operations/pay-peer-pull-credit.ts
@@ -66,12 +66,9 @@ import {
OperationAttemptResult,
OperationAttemptResultType,
constructTaskIdentifier,
-} from "../util/retries.js";
-import {
LongpollResult,
- resetOperationTimeout,
runLongpollAsync,
- runOperationWithErrorReporting,
+ runTaskWithErrorReporting,
} from "./common.js";
import {
codecForExchangePurseStatus,
@@ -486,26 +483,6 @@ export async function processPeerPullCredit(
switch (pullIni.status) {
case PeerPullPaymentInitiationStatus.Done: {
- // We implement this case so that the "retry" action on a peer-pull-credit transaction
- // also retries the withdrawal task.
-
- logger.warn(
- "peer pull payment initiation is already finished, retrying withdrawal",
- );
-
- const withdrawalGroupId = pullIni.withdrawalGroupId;
-
- if (withdrawalGroupId) {
- const taskId = constructTaskIdentifier({
- tag: PendingTaskType.Withdraw,
- withdrawalGroupId,
- });
- stopLongpolling(ws, taskId);
- await resetOperationTimeout(ws, taskId);
- await runOperationWithErrorReporting(ws, taskId, () =>
- processWithdrawalGroup(ws, withdrawalGroupId),
- );
- }
return {
type: OperationAttemptResultType.Finished,
result: undefined,
@@ -811,7 +788,7 @@ export async function initiatePeerPullPayment(
pursePub: pursePair.pub,
});
- await runOperationWithErrorReporting(ws, taskId, async () => {
+ await runTaskWithErrorReporting(ws, taskId, async () => {
return processPeerPullCredit(ws, pursePair.pub);
});