fix: change address and Select All coins

This commit is contained in:
Vlad Stan
2022-08-03 13:50:07 +03:00
parent dc95143998
commit 86d3ebd5dc
3 changed files with 9 additions and 11 deletions
@@ -102,17 +102,18 @@ async function utxoList(path) {
return total
},
applyUtxoSelectionMode: function () {
const isSelectAll = mode === 'Select All'
if (isSelectAll) {
this.utxos.data.forEach(u => (u.selected = true))
return
}
const payedAmount = this['payed-amount']
const mode = this.payment.utxoSelectionMode
this.utxos.data.forEach(u => (u.selected = false))
const isManual = mode === 'Manual'
if (isManual || !payedAmount) return
const isSelectAll = mode === 'Select All'
if (isSelectAll || payedAmount >= this.utxos.total) {
this.utxos.data.forEach(u => (u.selected = true))
return
}
const isSmallerFirst = mode === 'Smaller Inputs First'
const isLargerFirst = mode === 'Larger Inputs First'