mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Fix bug with displaying wrong tx id if deposit tx id was missing in trade process
This commit is contained in:
parent
90565bf43b
commit
16a542696e
@ -126,6 +126,7 @@ public class TxIdTextField extends AnchorPane {
|
||||
textField.setOnMouseClicked(null);
|
||||
blockExplorerIcon.setOnMouseClicked(null);
|
||||
copyIcon.setOnMouseClicked(null);
|
||||
textField.setText("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -291,6 +291,8 @@ public class PendingTradesDataModel extends ActivatableDataModel {
|
||||
isOfferer = tradeManager.isMyOffer(trade.getOffer());
|
||||
if (trade.getDepositTx() != null)
|
||||
txId.set(trade.getDepositTx().getHashAsString());
|
||||
else
|
||||
txId.set("");
|
||||
notificationCenter.setSelectedTradeId(trade.getId());
|
||||
} else {
|
||||
notificationCenter.setSelectedTradeId(null);
|
||||
|
@ -95,7 +95,12 @@ public abstract class TradeStepView extends AnchorPane {
|
||||
if (txIdSubscription != null)
|
||||
txIdSubscription.unsubscribe();
|
||||
|
||||
txIdSubscription = EasyBind.subscribe(model.dataModel.txId, id -> txIdTextField.setup(id));
|
||||
txIdSubscription = EasyBind.subscribe(model.dataModel.txId, id -> {
|
||||
if (!id.isEmpty())
|
||||
txIdTextField.setup(id);
|
||||
else
|
||||
txIdTextField.cleanup();
|
||||
});
|
||||
}
|
||||
trade.errorMessageProperty().addListener(errorMessageListener);
|
||||
|
||||
@ -162,8 +167,11 @@ public abstract class TradeStepView extends AnchorPane {
|
||||
protected void addTradeInfoBlock() {
|
||||
tradeInfoTitledGroupBg = addTitledGroupBg(gridPane, gridRow, 4, "Trade information");
|
||||
txIdTextField = addLabelTxIdTextField(gridPane, gridRow, "Deposit transaction ID:", Layout.FIRST_ROW_DISTANCE).second;
|
||||
if (model.dataModel.txId.get() != null)
|
||||
txIdTextField.setup(model.dataModel.txId.get());
|
||||
String id = model.dataModel.txId.get();
|
||||
if (!id.isEmpty())
|
||||
txIdTextField.setup(id);
|
||||
else
|
||||
txIdTextField.cleanup();
|
||||
|
||||
PaymentMethodForm.addAllowedPeriod(gridPane, ++gridRow, model.dataModel.getSellersPaymentAccountContractData(),
|
||||
model.getDateForOpenDispute());
|
||||
|
Loading…
Reference in New Issue
Block a user