From 62f687917f058d6f36c59d801327ed81fa01d724 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 8 Aug 2016 14:54:56 -0700 Subject: [PATCH] mtx: fix subtractFee. --- lib/bcoin/mtx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bcoin/mtx.js b/lib/bcoin/mtx.js index 6701fc81..1842d8ba 100644 --- a/lib/bcoin/mtx.js +++ b/lib/bcoin/mtx.js @@ -1004,7 +1004,7 @@ MTX.prototype.selectCoins = function selectCoins(coins, options) { } function total() { - if (options.subtractFee != null) + if (options.subtractFee || options.subtractFee === 0) return outputValue; return outputValue + fee; }