aboutsummaryrefslogtreecommitdiff
path: root/src/webex/pages/refund.tsx
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-10-15 18:30:02 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-10-15 18:30:02 +0200
commit03782f8aea043042aaa069de0b91cdb80fbb4679 (patch)
treecc8890eb060fe15cefa107c9261fc7e558d564b1 /src/webex/pages/refund.tsx
parent23633cf1be5ce8f1bc4d7823d1d561149cb6c8a8 (diff)
downloadwallet-core-03782f8aea043042aaa069de0b91cdb80fbb4679.tar.xz
derive history from db instead of storing it
Diffstat (limited to 'src/webex/pages/refund.tsx')
-rw-r--r--src/webex/pages/refund.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/webex/pages/refund.tsx b/src/webex/pages/refund.tsx
index d2c21c2f4..73bed30ee 100644
--- a/src/webex/pages/refund.tsx
+++ b/src/webex/pages/refund.tsx
@@ -63,10 +63,12 @@ const RefundDetail = ({purchase, fullRefundFees}: {purchase: types.PurchaseRecor
amountDone = types.Amounts.add(amountDone, purchase.refundsDone[k].refund_amount).amount;
}
+ const hasPending = amountPending.fraction !== 0 || amountPending.value !== 0;
+
return (
<div>
- <p>Refund fully received: <AmountDisplay amount={amountDone} /> (refund fees: <AmountDisplay amount={fullRefundFees} />)</p>
- <p>Refund incoming: <AmountDisplay amount={amountPending} /></p>
+ {hasPending ? <p>Refund pending: <AmountDisplay amount={amountPending} /></p> : null}
+ <p>Refund received: <AmountDisplay amount={amountDone} /> (refund fees: <AmountDisplay amount={fullRefundFees} />)</p>
</div>
);
};