mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-12 09:27:01 +00:00
fix bug I introduced last commit
This commit is contained in:
parent
d546d5de97
commit
6a9c58d012
1 changed files with 5 additions and 4 deletions
|
@ -149,10 +149,11 @@ class BitcoinFrostWallet<T extends FrostCurrency> extends Wallet<T>
|
|||
rawValue: BigInt.from(utxo.value),
|
||||
fractionDigits: cryptoCurrency.fractionDigits,
|
||||
);
|
||||
if (sum < total) {
|
||||
utxosToUse.add(utxo);
|
||||
} else {
|
||||
utxosRemaining.addAll(utxos.sublist(i));
|
||||
utxosToUse.add(utxo);
|
||||
if (sum > total) {
|
||||
if (i + 1 < utxos.length) {
|
||||
utxosRemaining.addAll(utxos.sublist(i));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue