rename trade getPayoutAmount() to getPayoutAmountBeforeCost()

This commit is contained in:
woodser 2023-12-09 06:21:59 -05:00
parent 7bfba15109
commit 948be8ce29
5 changed files with 6 additions and 6 deletions

View file

@ -31,7 +31,7 @@ public class ArbitratorTrade extends Trade {
} }
@Override @Override
public BigInteger getPayoutAmount() { public BigInteger getPayoutAmountBeforeCost() {
throw new RuntimeException("Arbitrator does not have a payout amount"); throw new RuntimeException("Arbitrator does not have a payout amount");
} }

View file

@ -53,7 +53,7 @@ public abstract class BuyerTrade extends Trade {
} }
@Override @Override
public BigInteger getPayoutAmount() { public BigInteger getPayoutAmountBeforeCost() {
checkNotNull(getAmount(), "Invalid state: getTradeAmount() = null"); checkNotNull(getAmount(), "Invalid state: getTradeAmount() = null");
return getAmount().add(getBuyerSecurityDepositBeforeMiningFee()); return getAmount().add(getBuyerSecurityDepositBeforeMiningFee());
} }

View file

@ -51,7 +51,7 @@ public abstract class SellerTrade extends Trade {
} }
@Override @Override
public BigInteger getPayoutAmount() { public BigInteger getPayoutAmountBeforeCost() {
return getSellerSecurityDepositBeforeMiningFee(); return getSellerSecurityDepositBeforeMiningFee();
} }

View file

@ -1200,7 +1200,7 @@ public abstract class Trade implements Tradable, Model {
// Abstract // Abstract
/////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////
public abstract BigInteger getPayoutAmount(); public abstract BigInteger getPayoutAmountBeforeCost();
public abstract boolean confirmPermitted(); public abstract boolean confirmPermitted();

View file

@ -223,9 +223,9 @@ public class PendingTradesViewModel extends ActivatableWithDataModel<PendingTrad
return sellerState; return sellerState;
} }
public String getPayoutAmount() { public String getPayoutAmountBeforeCost() {
return dataModel.getTrade() != null return dataModel.getTrade() != null
? HavenoUtils.formatXmr(dataModel.getTrade().getPayoutAmount(), true) ? HavenoUtils.formatXmr(dataModel.getTrade().getPayoutAmountBeforeCost(), true)
: ""; : "";
} }