diff options
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.ts | 27 |
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); }); |