mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Merge pull request #6040 from jmacxx/fix_bsq_sending_issue
Fix issue selecting specific BSQ UTXO for send.
This commit is contained in:
commit
3f978252ac
3 changed files with 3 additions and 5 deletions
|
@ -56,7 +56,7 @@ public abstract class BisqDefaultCoinSelector implements CoinSelector {
|
|||
// We reset the value to null just after we have applied it inside the select method.
|
||||
@Nullable
|
||||
@Setter
|
||||
protected Set<TransactionOutput> utxoCandidates;
|
||||
private Set<TransactionOutput> utxoCandidates;
|
||||
|
||||
public CoinSelection select(Coin target, Set<TransactionOutput> candidates) {
|
||||
return select(target, new ArrayList<>(candidates));
|
||||
|
@ -78,8 +78,6 @@ public abstract class BisqDefaultCoinSelector implements CoinSelector {
|
|||
ArrayList<TransactionOutput> sortedOutputs;
|
||||
if (utxoCandidates != null) {
|
||||
sortedOutputs = new ArrayList<>(utxoCandidates);
|
||||
// We reuse the selectors. Reset the transactionOutputCandidates field
|
||||
utxoCandidates = null;
|
||||
} else {
|
||||
sortedOutputs = new ArrayList<>(candidates);
|
||||
}
|
||||
|
|
|
@ -588,7 +588,7 @@ public class BsqWalletService extends WalletService implements DaoStateListener
|
|||
wallet.completeTx(sendRequest);
|
||||
checkWalletConsistency(wallet);
|
||||
verifyTransaction(tx);
|
||||
|
||||
coinSelector.setUtxoCandidates(null); // We reuse the selectors. Reset the transactionOutputCandidates field
|
||||
return tx;
|
||||
} catch (InsufficientMoneyException e) {
|
||||
log.error("getPreparedSendTx: tx={}", tx.toString());
|
||||
|
|
|
@ -124,7 +124,7 @@ public class TxInputSelectionWindow extends Overlay<TxInputSelectionWindow> {
|
|||
.map(transactionOutput -> new TransactionOutputItem(transactionOutput, candidates.contains(transactionOutput)))
|
||||
.collect(Collectors.toList()));
|
||||
tableView.setItems(new SortedList<>(items));
|
||||
GUIUtil.setFitToRowsForTableView(tableView, 26, 28, 0, items.size());
|
||||
GUIUtil.setFitToRowsForTableView(tableView, 26, 28, 3, 15);
|
||||
|
||||
balanceTextField = FormBuilder.addBalanceTextField(gridPane, rowIndex++, Res.get("inputControlWindow.balanceLabel"), Layout.FIRST_ROW_DISTANCE);
|
||||
balanceTextField.setFormatter(formatter);
|
||||
|
|
Loading…
Add table
Reference in a new issue