From ef0acf06bfb7820a21c4719dba0d659f600be3c7 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 2 Apr 2020 20:33:01 +0530 Subject: model reserve history in the exchange, improve reserve handling logic --- src/operations/refund.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/operations/refund.ts') diff --git a/src/operations/refund.ts b/src/operations/refund.ts index 7552fc11c..f0fec4065 100644 --- a/src/operations/refund.ts +++ b/src/operations/refund.ts @@ -41,7 +41,7 @@ import { import { NotificationType } from "../types/notifications"; import { parseRefundUri } from "../util/taleruri"; import { createRefreshGroup, getTotalRefreshCost } from "./refresh"; -import * as Amounts from "../util/amounts"; +import { Amounts } from "../util/amounts"; import { MerchantRefundPermission, MerchantRefundResponse, @@ -476,7 +476,7 @@ async function processPurchaseApplyRefundImpl( `commiting refund ${perm.merchant_sig} to coin ${c.coinPub}`, ); logger.trace( - `coin amount before is ${Amounts.toString(c.currentAmount)}`, + `coin amount before is ${Amounts.stringify(c.currentAmount)}`, ); logger.trace(`refund amount (via merchant) is ${perm.refund_amount}`); logger.trace(`refund fee (via merchant) is ${perm.refund_fee}`); @@ -486,7 +486,7 @@ async function processPurchaseApplyRefundImpl( c.currentAmount = Amounts.add(c.currentAmount, refundAmount).amount; c.currentAmount = Amounts.sub(c.currentAmount, refundFee).amount; logger.trace( - `coin amount after is ${Amounts.toString(c.currentAmount)}`, + `coin amount after is ${Amounts.stringify(c.currentAmount)}`, ); await tx.put(Stores.coins, c); }; -- cgit v1.2.3