aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pay-merchant.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay-merchant.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/pay-merchant.ts27
1 files changed, 5 insertions, 22 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-merchant.ts b/packages/taler-wallet-core/src/operations/pay-merchant.ts
index cb17f16eb..83c6b74d3 100644
--- a/packages/taler-wallet-core/src/operations/pay-merchant.ts
+++ b/packages/taler-wallet-core/src/operations/pay-merchant.ts
@@ -1625,28 +1625,11 @@ export async function runPayForConfirmPay(
.runReadOnly(async (tx) =>
tx.operationRetries.get(RetryTags.byPaymentProposalId(proposalId)),
);
- const maxRetry = 3;
- const numRetry = opRetry?.retryInfo.retryCounter ?? 0;
- if (
- res.errorDetail.code ===
- TalerErrorCode.WALLET_PAY_MERCHANT_SERVER_ERROR &&
- numRetry < maxRetry
- ) {
- logger.trace("hiding transient error from caller");
- // Pretend the operation is pending instead of reporting
- // an error, but only up to maxRetry attempts.
- await storeOperationPending(
- ws,
- RetryTags.byPaymentProposalId(proposalId),
- );
- return {
- type: ConfirmPayResultType.Pending,
- lastError: opRetry?.lastError,
- transactionId: makeTransactionId(TransactionType.Payment, proposalId),
- };
- } else {
- throw Error("payment failed");
- }
+ return {
+ type: ConfirmPayResultType.Pending,
+ lastError: opRetry?.lastError,
+ transactionId: makeTransactionId(TransactionType.Payment, proposalId),
+ };
}
case OperationAttemptResultType.Pending:
logger.trace("reporting pending as confirmPay response");