diff options
-rw-r--r-- | packages/taler-wallet-core/src/pay-merchant.ts | 18 |
1 files changed, 6 insertions, 12 deletions
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; |