fix transaction IDs in legacy UI trade info views

This commit is contained in:
napoly 2022-11-11 17:54:50 +01:00 committed by woodser
parent 2684e7528a
commit 1f61e82946
18 changed files with 17 additions and 35 deletions

View file

@ -265,8 +265,10 @@ public class ContractWindow extends Overlay<ContractWindow> {
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.makerFeeTxId"), offer.getOfferFeePaymentTxId());
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.takerFeeTxId"), "TAKER FEE TX ID NOT PART OF CONTRACT"); // TODO (woodser): should taker fee tx id be part of contract?
if (dispute.getDepositTxSerialized() != null)
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.depositTransactionId"), dispute.getDepositTxId());
if (dispute.getDepositTxSerialized() != null) {
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.makerDepositTransactionId"), contract.getMakerDepositTxHash());
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.takerDepositTransactionId"), contract.getTakerDepositTxHash());
}
if (dispute.getDelayedPayoutTxId() != null)
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.delayedPayoutTxId"), dispute.getDelayedPayoutTxId());

View file

@ -18,8 +18,6 @@
package bisq.desktop.main.overlays.windows;
import bisq.desktop.components.HavenoTextArea;
import bisq.desktop.components.TextFieldWithCopyIcon;
import bisq.desktop.components.TxIdTextField;
import bisq.desktop.main.MainView;
import bisq.desktop.main.overlays.Overlay;
import bisq.desktop.util.DisplayUtils;
@ -33,9 +31,9 @@ import bisq.core.offer.Offer;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.support.dispute.agent.DisputeAgentLookupMap;
import bisq.core.support.dispute.arbitration.ArbitrationManager;
import bisq.core.trade.TradeManager;
import bisq.core.trade.Contract;
import bisq.core.trade.Trade;
import bisq.core.trade.TradeManager;
import bisq.core.trade.txproof.AssetTxProofResult;
import bisq.core.util.FormattingUtils;
import bisq.core.util.VolumeUtil;
@ -46,9 +44,6 @@ import bisq.network.p2p.NodeAddress;
import bisq.common.UserThread;
import bisq.common.util.Tuple3;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.Utils;
import javax.inject.Inject;
import javax.inject.Named;
@ -273,13 +268,11 @@ public class TradeDetailsWindow extends Overlay<TradeDetailsWindow> {
Res.get(contract.getPaymentMethodId()));
}
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.makerFeeTxId"), offer.getOfferFeePaymentTxId());
if (trade.getMakerDepositTx() != null)
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.depositTransactionId"), // TODO (woodser): separate UI labels for deposit tx ids
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.makerDepositTransactionId"),
trade.getMakerDepositTx().getHash());
if (trade.getTakerDepositTx() != null)
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.depositTransactionId"), // TODO (woodser): separate UI labels for deposit tx ids
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.takerDepositTransactionId"),
trade.getTakerDepositTx().getHash());
if (trade.getPayoutTxId() != null)

View file

@ -335,8 +335,7 @@ public abstract class TradeStepView extends AnchorPane {
// self's deposit tx id
final Tuple3<Label, TxIdTextField, VBox> labelSelfTxIdTextFieldVBoxTuple3 =
addTopLabelTxIdTextField(gridPane, gridRow,
"Your " + Res.get("shared.depositTransactionId").toLowerCase(),
addTopLabelTxIdTextField(gridPane, gridRow, Res.get("shared.yourDepositTransactionId"),
Layout.COMPACT_FIRST_ROW_DISTANCE);
GridPane.setColumnSpan(labelSelfTxIdTextFieldVBoxTuple3.third, 2);
@ -350,8 +349,7 @@ public abstract class TradeStepView extends AnchorPane {
// peer's deposit tx id
final Tuple3<Label, TxIdTextField, VBox> labelPeerTxIdTextFieldVBoxTuple3 =
addTopLabelTxIdTextField(gridPane, ++gridRow,
"Peer's " + Res.get("shared.depositTransactionId").toLowerCase(),
addTopLabelTxIdTextField(gridPane, ++gridRow, Res.get("shared.peerDepositTransactionId"),
-Layout.GROUP_DISTANCE_WITHOUT_SEPARATOR);
GridPane.setColumnSpan(labelPeerTxIdTextFieldVBoxTuple3.third, 2);
@ -644,7 +642,7 @@ public abstract class TradeStepView extends AnchorPane {
}
Optional<Dispute> optionalDispute = model.dataModel.mediationManager.findDispute(trade.getId());
if (!optionalDispute.isPresent()) {
if (optionalDispute.isEmpty()) {
return;
}
@ -656,14 +654,14 @@ public abstract class TradeStepView extends AnchorPane {
log.error("trade.getMakerDepositTx() was null at openMediationResultPopup. " +
"We add the trade to failed trades. TradeId={}", trade.getId());
//model.dataModel.addTradeToFailedTrades(); // TODO (woodser): new way to move trade to failed trades?
model.dataModel.onMoveInvalidTradeToFailedTrades(trade);;
model.dataModel.onMoveInvalidTradeToFailedTrades(trade);
new Popup().warning(Res.get("portfolio.pending.mediationResult.error.depositTxNull")).show(); // TODO (woodser): separate error messages for maker/taker
return;
} else if (trade instanceof TakerTrade && trade.getTakerDepositTx() == null) {
log.error("trade.getTakerDepositTx() was null at openMediationResultPopup. " +
"We add the trade to failed trades. TradeId={}", trade.getId());
//model.dataModel.addTradeToFailedTrades();
model.dataModel.onMoveInvalidTradeToFailedTrades(trade);;
model.dataModel.onMoveInvalidTradeToFailedTrades(trade);
new Popup().warning(Res.get("portfolio.pending.mediationResult.error.depositTxNull")).show();
return;
}