Skip to content

Commit

Permalink
fix bug I introduced last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-CStack committed Jul 17, 2024
1 parent d546d5d commit 6a9c58d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/wallets/wallet/impl/bitcoin_frost_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 6a9c58d

Please sign in to comment.