commit 1a7e582fc8aa6991df4dd3895ca4b042a613b02d
parent 1ececa7be1b4f78b8e67903066dfb6825195e5ab
Author: Florian Dold <florian@dold.me>
Date: Sun, 25 Feb 2024 12:44:13 +0100
-dce
Diffstat:
1 file 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
@@ -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;