From a164ea91838b0dd2506acbd67e1b3720abaa7e01 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 8 Sep 2016 17:26:31 +0200 Subject: rudimentary 402 handling --- lib/wallet/wallet.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/wallet/wallet.ts') diff --git a/lib/wallet/wallet.ts b/lib/wallet/wallet.ts index 718e7a312..7cb30c358 100644 --- a/lib/wallet/wallet.ts +++ b/lib/wallet/wallet.ts @@ -242,9 +242,16 @@ function getWithdrawDenomList(amountAvailable: AmountJson, let remaining = Amounts.copy(amountAvailable); let ds: Denomination[] = []; + console.log("available denoms"); + console.log(denoms); + denoms = denoms.filter(isWithdrawableDenom); denoms.sort((d1, d2) => Amounts.cmp(d2.value, d1.value)); + console.log("withdrawable denoms"); + console.log(denoms); + + // This is an arbitrary number of coins // we can withdraw in one go. It's not clear if this limit // is useful ... -- cgit v1.2.3