From 4ed70b93622aa59c1e5618b1b7e44e7083abd4bb Mon Sep 17 00:00:00 2001 From: woodser Date: Mon, 23 Dec 2024 06:28:31 -0500 Subject: [PATCH] show security deposit from trade amount in take offer and trade details --- .../desktop/main/overlays/windows/OfferDetailsWindow.java | 4 ++-- .../desktop/main/overlays/windows/TradeDetailsWindow.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/windows/OfferDetailsWindow.java b/desktop/src/main/java/haveno/desktop/main/overlays/windows/OfferDetailsWindow.java index 7825c7a610..adf841a147 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/windows/OfferDetailsWindow.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/windows/OfferDetailsWindow.java @@ -368,11 +368,11 @@ public class OfferDetailsWindow extends Overlay { DisplayUtils.formatDateTime(offer.getDate())); String value = Res.getWithColAndCap("shared.buyer") + " " + - HavenoUtils.formatXmr(offer.getOfferPayload().getMaxBuyerSecurityDeposit(), true) + + HavenoUtils.formatXmr(takeOfferHandlerOptional.isPresent() ? offer.getOfferPayload().getBuyerSecurityDepositForTradeAmount(tradeAmount) : offer.getOfferPayload().getMaxBuyerSecurityDeposit(), true) + " / " + Res.getWithColAndCap("shared.seller") + " " + - HavenoUtils.formatXmr(offer.getOfferPayload().getMaxSellerSecurityDeposit(), true); + HavenoUtils.formatXmr(takeOfferHandlerOptional.isPresent() ? offer.getOfferPayload().getSellerSecurityDepositForTradeAmount(tradeAmount) : offer.getOfferPayload().getMaxSellerSecurityDeposit(), true); addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("shared.securityDeposit"), value); if (reservedAmount != null) { diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/windows/TradeDetailsWindow.java b/desktop/src/main/java/haveno/desktop/main/overlays/windows/TradeDetailsWindow.java index 0484305792..0e3397ca54 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/windows/TradeDetailsWindow.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/windows/TradeDetailsWindow.java @@ -201,11 +201,11 @@ public class TradeDetailsWindow extends Overlay { DisplayUtils.formatDateTime(trade.getDate())); String securityDeposit = Res.getWithColAndCap("shared.buyer") + " " + - HavenoUtils.formatXmr(offer.getMaxBuyerSecurityDeposit(), true) + + HavenoUtils.formatXmr(trade.getBuyerSecurityDepositBeforeMiningFee(), true) + " / " + Res.getWithColAndCap("shared.seller") + " " + - HavenoUtils.formatXmr(offer.getMaxSellerSecurityDeposit(), true); + HavenoUtils.formatXmr(trade.getSellerSecurityDepositBeforeMiningFee(), true); addConfirmationLabelTextField(gridPane, ++rowIndex, Res.get("shared.securityDeposit"), securityDeposit); NodeAddress arbitratorNodeAddress = trade.getArbitratorNodeAddress();