summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-02-25 12:44:13 +0100
committerFlorian Dold <florian@dold.me>2024-02-25 12:44:13 +0100
commit1a7e582fc8aa6991df4dd3895ca4b042a613b02d (patch)
treee70ec12818b4c67b3bfcc0498dcbb5b604e67caf
parent1ececa7be1b4f78b8e67903066dfb6825195e5ab (diff)
downloadwallet-core-1a7e582fc8aa6991df4dd3895ca4b042a613b02d.tar.gz
wallet-core-1a7e582fc8aa6991df4dd3895ca4b042a613b02d.tar.bz2
wallet-core-1a7e582fc8aa6991df4dd3895ca4b042a613b02d.zip
-dce
-rw-r--r--packages/taler-wallet-core/src/pay-merchant.ts18
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;