mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Add cancel button to SelectDepositTxPopup
This commit is contained in:
parent
2e363a36b6
commit
276e02e102
2 changed files with 9 additions and 5 deletions
|
@ -221,9 +221,12 @@ public class PendingTradesDataModel extends ActivatableDataModel {
|
|||
if (candidates.size() == 1)
|
||||
doOpenDispute(isSupportTicket, candidates.get(0));
|
||||
else if (candidates.size() > 1)
|
||||
new SelectDepositTxPopup().transactions(candidates).onSelect(transaction -> {
|
||||
new SelectDepositTxPopup().transactions(candidates)
|
||||
.onSelect(transaction -> {
|
||||
doOpenDispute(isSupportTicket, transaction);
|
||||
}).show();
|
||||
})
|
||||
.closeButtonText("Cancel")
|
||||
.show();
|
||||
else
|
||||
log.error("Trade.depositTx is null and we did not find any MultiSig transaction.");
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ package io.bitsquare.gui.popups;
|
|||
|
||||
import io.bitsquare.common.util.Tuple2;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.ComboBox;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.util.StringConverter;
|
||||
|
@ -37,7 +36,6 @@ import static io.bitsquare.gui.util.FormBuilder.addMultilineLabel;
|
|||
|
||||
public class SelectDepositTxPopup extends Popup {
|
||||
private static final Logger log = LoggerFactory.getLogger(SelectDepositTxPopup.class);
|
||||
private Button emptyWalletButton;
|
||||
private ComboBox<Transaction> transactionsComboBox;
|
||||
private List<Transaction> transaction;
|
||||
private Optional<Consumer<Transaction>> selectHandlerOptional;
|
||||
|
@ -59,6 +57,7 @@ public class SelectDepositTxPopup extends Popup {
|
|||
createGridPane();
|
||||
addHeadLine();
|
||||
addContent();
|
||||
addCloseButton();
|
||||
createPopup();
|
||||
return this;
|
||||
}
|
||||
|
@ -86,6 +85,7 @@ public class SelectDepositTxPopup extends Popup {
|
|||
|
||||
Tuple2<Label, ComboBox> tuple = addLabelComboBox(gridPane, ++rowIndex);
|
||||
transactionsComboBox = tuple.second;
|
||||
transactionsComboBox.setPromptText("Select deposit transaction");
|
||||
transactionsComboBox.setConverter(new StringConverter<Transaction>() {
|
||||
@Override
|
||||
public String toString(Transaction transaction) {
|
||||
|
@ -100,6 +100,7 @@ public class SelectDepositTxPopup extends Popup {
|
|||
transactionsComboBox.setItems(FXCollections.observableArrayList(transaction));
|
||||
transactionsComboBox.setOnAction(event -> {
|
||||
selectHandlerOptional.get().accept(transactionsComboBox.getSelectionModel().getSelectedItem());
|
||||
hide();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue