fix bug I introduced last commit

This commit is contained in:
julian 2024-07-17 15:45:21 -06:00 committed by julian-CStack
parent d546d5de97
commit 6a9c58d012

View file

@ -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;
}
}