diff options
author | Sebastian <sebasjm@gmail.com> | 2022-11-04 10:58:13 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-11-04 11:56:05 -0300 |
commit | 80ab8ccce9a9ce46b445d0857769aadd640073a3 (patch) | |
tree | 195492f53138f57c1268b9ffd9062ea2d3ae9570 /packages/merchant-backoffice-ui/src/paths/instance/orders/list | |
parent | 50e51429ee82190f3c60157a84f13d473d34cb49 (diff) | |
download | wallet-core-80ab8ccce9a9ce46b445d0857769aadd640073a3.tar.xz |
upgrade amount api
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/orders/list')
-rw-r--r-- | packages/merchant-backoffice-ui/src/paths/instance/orders/list/Table.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/list/Table.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/list/Table.tsx index 29a9670bc..02d5b0bfc 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/orders/list/Table.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/list/Table.tsx @@ -268,14 +268,14 @@ export function RefundModal({ .map((r) => r.amount) .reduce( (p, c) => Amounts.add(p, Amounts.parseOrThrow(c)).amount, - Amounts.getZero(config.currency) + Amounts.zeroOfCurrency(config.currency) ); const orderPrice = order.order_status === "paid" ? Amounts.parseOrThrow(order.contract_terms.amount) : undefined; const totalRefundable = !orderPrice - ? Amounts.getZero(totalRefunded.currency) + ? Amounts.zeroOfCurrency(totalRefunded.currency) : refunds.length ? Amounts.sub(orderPrice, totalRefunded).amount : orderPrice; |