aboutsummaryrefslogtreecommitdiff
path: root/lib/wallet/wallet.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-09-08 17:26:31 +0200
committerFlorian Dold <florian.dold@gmail.com>2016-09-08 17:26:31 +0200
commita164ea91838b0dd2506acbd67e1b3720abaa7e01 (patch)
tree93b698668cffcc93c2ba3294ff8845dd4d42e439 /lib/wallet/wallet.ts
parent4b67f220e7d9ab4a7d7a190892f028995baa9902 (diff)
downloadwallet-core-a164ea91838b0dd2506acbd67e1b3720abaa7e01.tar.xz
rudimentary 402 handling
Diffstat (limited to 'lib/wallet/wallet.ts')
-rw-r--r--lib/wallet/wallet.ts7
1 files changed, 7 insertions, 0 deletions
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 ...