mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 02:12:00 +01:00
Fix bug with open trades row selection (#238)
This commit is contained in:
parent
52da080f22
commit
008ae0ef52
@ -188,10 +188,6 @@ class PendingTradesModel extends UIModel {
|
||||
|
||||
trade.faultProperty().addListener(faultChangeListener);
|
||||
fault.set(trade.faultProperty().get());
|
||||
|
||||
if (closedTrade != null) {
|
||||
list.removeIf(e -> e.getTrade().getId().equals(closedTrade.getId()));
|
||||
}
|
||||
}
|
||||
else {
|
||||
txId.set(null);
|
||||
@ -207,18 +203,16 @@ class PendingTradesModel extends UIModel {
|
||||
tradeManager.fiatPaymentReceived(getTrade().getId());
|
||||
}
|
||||
|
||||
void removePendingTrade() {
|
||||
if (closedTrade != null) {
|
||||
list.removeIf(e -> e.getTrade().getId().equals(closedTrade.getId()));
|
||||
}
|
||||
}
|
||||
|
||||
void withdraw(String toAddress) {
|
||||
FutureCallback<Transaction> callback = new FutureCallback<Transaction>() {
|
||||
@Override
|
||||
public void onSuccess(@javax.annotation.Nullable Transaction transaction) {
|
||||
if (transaction != null) {
|
||||
log.info("onWithdraw onSuccess tx ID:" + transaction.getHashAsString());
|
||||
|
||||
if (closedTrade != null) {
|
||||
list.removeIf(e -> e.getTrade().getId().equals(closedTrade.getId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,10 +133,6 @@ public class PendingTradesPM extends PresentationModel<PendingTradesModel> {
|
||||
model.fiatPaymentReceived();
|
||||
}
|
||||
|
||||
void removePendingTrade() {
|
||||
model.removePendingTrade();
|
||||
}
|
||||
|
||||
void withdraw(String withdrawToAddress) {
|
||||
// TODO address validation
|
||||
if (withdrawToAddress != null && withdrawToAddress.length() > 0)
|
||||
|
@ -107,12 +107,12 @@ public class PendingTradesViewCB extends CachedViewCB<PendingTradesPM> {
|
||||
setVolumeColumnCellFactory();
|
||||
setDateColumnCellFactory();
|
||||
|
||||
scrollPane.vvalueProperty().addListener((ov, oldValue, newValue) -> {
|
||||
/* scrollPane.vvalueProperty().addListener((ov, oldValue, newValue) -> {
|
||||
log.debug("#### vvalueProperty " + newValue);
|
||||
});
|
||||
scrollPane.viewportBoundsProperty().addListener((ov, oldValue, newValue) -> {
|
||||
log.debug("#### viewportBoundsProperty " + newValue);
|
||||
});
|
||||
});*/
|
||||
|
||||
table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
|
||||
table.setPlaceholder(new Label("No pending trades available"));
|
||||
@ -206,7 +206,6 @@ public class PendingTradesViewCB extends CachedViewCB<PendingTradesPM> {
|
||||
@FXML
|
||||
public void onWithdraw() {
|
||||
setSummaryControlsVisible(false);
|
||||
presentationModel.removePendingTrade();
|
||||
presentationModel.withdraw(withdrawAddressTextField.getText());
|
||||
Platform.runLater(() ->
|
||||
navigation.navigationTo(Navigation.Item.MAIN, Navigation.Item.PORTFOLIO,
|
||||
|
Loading…
Reference in New Issue
Block a user