aboutsummaryrefslogtreecommitdiff
path: root/src/operations/refund.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/operations/refund.ts')
-rw-r--r--src/operations/refund.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/operations/refund.ts b/src/operations/refund.ts
index af3325cfd..b91d42a3f 100644
--- a/src/operations/refund.ts
+++ b/src/operations/refund.ts
@@ -227,7 +227,7 @@ async function acceptRefunds(
// Still pending.
if (
- refundStatus.success === false &&
+ refundStatus.type === "failure" &&
existingRefundInfo?.type === RefundState.Pending
) {
continue;
@@ -235,7 +235,7 @@ async function acceptRefunds(
// Invariant: (!existingRefundInfo) || (existingRefundInfo === Pending)
- if (refundStatus.success === true) {
+ if (refundStatus.type === "success") {
await applySuccessfulRefund(tx, p, refreshCoinsMap, refundStatus);
} else {
await storePendingRefund(tx, p, refundStatus);
@@ -417,7 +417,7 @@ async function processPurchaseQueryRefundImpl(
codecForMerchantOrderStatus(),
);
- if (!refundResponse.paid) {
+ if (refundResponse.order_status !== "paid") {
logger.error("can't refund unpaid order");
return;
}