Move fee estimation into networks.js
This commit is contained in:
parent
79ec61d085
commit
122b613eaf
3 changed files with 36 additions and 5 deletions
src
|
@ -237,7 +237,7 @@ function Wallet(seed, network) {
|
|||
tmpTx.addOutput(getChangeAddress(), 0)
|
||||
|
||||
var byteSize = tmpTx.toBuffer().length
|
||||
return network.feePerKb * Math.ceil(byteSize / 1000)
|
||||
return network.estimateFee(byteSize)
|
||||
}
|
||||
|
||||
function getChangeAddress() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue