From 948be8ce29193bcc25db10eafb39a5ca818b8122 Mon Sep 17 00:00:00 2001 From: woodser Date: Sat, 9 Dec 2023 06:21:59 -0500 Subject: [PATCH] rename trade getPayoutAmount() to getPayoutAmountBeforeCost() --- core/src/main/java/haveno/core/trade/ArbitratorTrade.java | 2 +- core/src/main/java/haveno/core/trade/BuyerTrade.java | 2 +- core/src/main/java/haveno/core/trade/SellerTrade.java | 2 +- core/src/main/java/haveno/core/trade/Trade.java | 2 +- .../main/portfolio/pendingtrades/PendingTradesViewModel.java | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/haveno/core/trade/ArbitratorTrade.java b/core/src/main/java/haveno/core/trade/ArbitratorTrade.java index 03b0d20215..f46c4eb1b7 100644 --- a/core/src/main/java/haveno/core/trade/ArbitratorTrade.java +++ b/core/src/main/java/haveno/core/trade/ArbitratorTrade.java @@ -31,7 +31,7 @@ public class ArbitratorTrade extends Trade { } @Override - public BigInteger getPayoutAmount() { + public BigInteger getPayoutAmountBeforeCost() { throw new RuntimeException("Arbitrator does not have a payout amount"); } diff --git a/core/src/main/java/haveno/core/trade/BuyerTrade.java b/core/src/main/java/haveno/core/trade/BuyerTrade.java index df0ae0f1d4..6550bbb54e 100644 --- a/core/src/main/java/haveno/core/trade/BuyerTrade.java +++ b/core/src/main/java/haveno/core/trade/BuyerTrade.java @@ -53,7 +53,7 @@ public abstract class BuyerTrade extends Trade { } @Override - public BigInteger getPayoutAmount() { + public BigInteger getPayoutAmountBeforeCost() { checkNotNull(getAmount(), "Invalid state: getTradeAmount() = null"); return getAmount().add(getBuyerSecurityDepositBeforeMiningFee()); } diff --git a/core/src/main/java/haveno/core/trade/SellerTrade.java b/core/src/main/java/haveno/core/trade/SellerTrade.java index 7b83918002..bb6080d2f5 100644 --- a/core/src/main/java/haveno/core/trade/SellerTrade.java +++ b/core/src/main/java/haveno/core/trade/SellerTrade.java @@ -51,7 +51,7 @@ public abstract class SellerTrade extends Trade { } @Override - public BigInteger getPayoutAmount() { + public BigInteger getPayoutAmountBeforeCost() { return getSellerSecurityDepositBeforeMiningFee(); } diff --git a/core/src/main/java/haveno/core/trade/Trade.java b/core/src/main/java/haveno/core/trade/Trade.java index f315c6cb62..1efff6f714 100644 --- a/core/src/main/java/haveno/core/trade/Trade.java +++ b/core/src/main/java/haveno/core/trade/Trade.java @@ -1200,7 +1200,7 @@ public abstract class Trade implements Tradable, Model { // Abstract /////////////////////////////////////////////////////////////////////////////////////////// - public abstract BigInteger getPayoutAmount(); + public abstract BigInteger getPayoutAmountBeforeCost(); public abstract boolean confirmPermitted(); diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesViewModel.java b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesViewModel.java index 84de9934f6..87208d6d26 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesViewModel.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesViewModel.java @@ -223,9 +223,9 @@ public class PendingTradesViewModel extends ActivatableWithDataModel