fix: change & fee value
This commit is contained in:
parent
a0450cbdd9
commit
40ca51af0e
1 changed files with 3 additions and 2 deletions
|
|
@ -68,7 +68,7 @@ async function payment(path) {
|
||||||
return (
|
return (
|
||||||
this.selectedAmount -
|
this.selectedAmount -
|
||||||
this.totalPayedAmount -
|
this.totalPayedAmount -
|
||||||
this.feeRate * this.txSizeNoChange
|
this.feeRate * this.txSize
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
balance: function () {
|
balance: function () {
|
||||||
|
|
@ -184,7 +184,8 @@ async function payment(path) {
|
||||||
|
|
||||||
if (!excludeChange) {
|
if (!excludeChange) {
|
||||||
const change = this.createChangeOutput()
|
const change = this.createChangeOutput()
|
||||||
if (this.changeAmount >= this.DUST_LIMIT) {
|
const diffAmount = this.selectedAmount - this.totalPayedAmount
|
||||||
|
if (diffAmount >= this.DUST_LIMIT) {
|
||||||
tx.outputs.push(change)
|
tx.outputs.push(change)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue