aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-08-27 05:57:39 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-08-27 05:57:39 +0200
commitb47522c11bf5c426f998254f9dc61f0018229b44 (patch)
tree1dfe53eca3e2c36eec5a40ac72aebfdd52b6736a /src/wallet.ts
parent63914ab53b18ec29269c2c3fe4e01ac9b36330e5 (diff)
proper rounding for amount operations
Diffstat (limited to 'src/wallet.ts')
-rw-r--r--src/wallet.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wallet.ts b/src/wallet.ts
index e7a36f7b7..3d095fc06 100644
--- a/src/wallet.ts
+++ b/src/wallet.ts
@@ -413,6 +413,8 @@ export function selectPayCoins(cds: CoinWithDenom[], paymentAmount: AmountJson,
denom.feeDeposit).amount) >= 0;
isBelowFee = Amounts.cmp(accFee, depositFeeLimit) <= 0;
+ console.log("coin selection", { coversAmount, isBelowFee, accFee, accAmount, paymentAmount });
+
if ((coversAmount && isBelowFee) || coversAmountWithFee) {
return cdsResult;
}
@@ -759,6 +761,8 @@ export class Wallet {
cds.push({coin, denom});
}
+ console.log("coin return: selecting from possible coins", { cds, amount } );
+
return selectPayCoins(cds, amount, amount);
}