summaryrefslogtreecommitdiff
path: root/src/operations/transactions.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/operations/transactions.ts')
-rw-r--r--src/operations/transactions.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/operations/transactions.ts b/src/operations/transactions.ts
index fd7679621..9e07d4ff5 100644
--- a/src/operations/transactions.ts
+++ b/src/operations/transactions.ts
@@ -63,6 +63,8 @@ function getRefundStats(
.amount;
}
+ // Subtract fees from effective refund amount
+
for (const rk of Object.keys(pr.refundsDone)) {
const perm = pr.refundsDone[rk].perm;
if (pr.refundsDone[rk].refundGroupId !== refundGroupId) {
@@ -72,6 +74,12 @@ function getRefundStats(
amountEffective,
Amounts.parseOrThrow(perm.refund_fee),
).amount;
+ if (pr.refundsRefreshCost[rk]) {
+ amountEffective = Amounts.sub(
+ amountEffective,
+ pr.refundsRefreshCost[rk],
+ ).amount;
+ }
}
for (const rk of Object.keys(pr.refundsFailed)) {