wallet: do not overestimate fees when network has dustSoftThreshold

This commit is contained in:
Wei Lu 2014-06-18 21:16:17 +08:00
parent 7e31668b69
commit 79a17d67ec
2 changed files with 39 additions and 17 deletions

View file

@ -235,7 +235,7 @@ function Wallet(seed, network) {
function estimateFeePadChangeOutput(tx) {
var tmpTx = tx.clone()
tmpTx.addOutput(getChangeAddress(), 0)
tmpTx.addOutput(getChangeAddress(), network.dustSoftThreshold || 0)
return network.estimateFee(tmpTx)
}