From 1a7e582fc8aa6991df4dd3895ca4b042a613b02d Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 25 Feb 2024 12:44:13 +0100 Subject: -dce --- packages/taler-wallet-core/src/pay-merchant.ts | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'packages/taler-wallet-core') diff --git a/packages/taler-wallet-core/src/pay-merchant.ts b/packages/taler-wallet-core/src/pay-merchant.ts index aeb4661ce..8fcb728d4 100644 --- a/packages/taler-wallet-core/src/pay-merchant.ts +++ b/packages/taler-wallet-core/src/pay-merchant.ts @@ -102,7 +102,6 @@ import { constructTaskIdentifier, PendingTaskType, spendCoins, - TaskIdentifiers, TaskIdStr, TaskRunResult, TaskRunResultType, @@ -641,14 +640,6 @@ async function processDownloadProposal( requestBody.token = proposal.claimToken; } - const opId = TaskIdentifiers.forPay(proposal); - const retryRecord = await ws.db.runReadOnlyTx( - ["operationRetries"], - async (tx) => { - return tx.operationRetries.get(opId); - }, - ); - const httpResponse = await ws.http.fetch(orderClaimUrl, { method: "POST", body: requestBody, @@ -816,9 +807,12 @@ async function processDownloadProposal( } // FIXME: Adjust this to account for refunds, don't count as repurchase // if original order is refunded. - if (otherPurchase && (otherPurchase.purchaseStatus == PurchaseStatus.Done - || otherPurchase.purchaseStatus == PurchaseStatus.PendingPaying - || otherPurchase.purchaseStatus == PurchaseStatus.PendingPayingReplay)) { + if ( + otherPurchase && + (otherPurchase.purchaseStatus == PurchaseStatus.Done || + otherPurchase.purchaseStatus == PurchaseStatus.PendingPaying || + otherPurchase.purchaseStatus == PurchaseStatus.PendingPayingReplay) + ) { logger.warn("repurchase detected"); p.purchaseStatus = PurchaseStatus.DoneRepurchaseDetected; p.repurchaseProposalId = otherPurchase.proposalId; -- cgit v1.2.3