From a495072694fef7df7599d577405d6df94a465d36 Mon Sep 17 00:00:00 2001 From: chimp1984 Date: Tue, 23 Nov 2021 00:39:38 +0100 Subject: [PATCH] Rename getPaymentMethod to getPaymentMethodId --- .../java/bisq/core/trade/statistics/TradeStatistics3.java | 4 ++-- .../bisq/core/trade/statistics/TradeStatisticsForJson.java | 2 +- .../src/main/java/bisq/desktop/main/market/MarketView.java | 2 +- .../desktop/main/market/trades/TradeStatistics3ListItem.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/bisq/core/trade/statistics/TradeStatistics3.java b/core/src/main/java/bisq/core/trade/statistics/TradeStatistics3.java index 06c7712ac3..8614678d57 100644 --- a/core/src/main/java/bisq/core/trade/statistics/TradeStatistics3.java +++ b/core/src/main/java/bisq/core/trade/statistics/TradeStatistics3.java @@ -398,7 +398,7 @@ public final class TradeStatistics3 implements ProcessOncePersistableNetworkPayl refundAgent = null; } - public String getPaymentMethod() { + public String getPaymentMethodId() { try { return PaymentMethodMapper.values()[Integer.parseInt(paymentMethod)].name(); } catch (Throwable ignore) { @@ -438,7 +438,7 @@ public final class TradeStatistics3 implements ProcessOncePersistableNetworkPayl long maxTradeLimit = Coin.COIN.multiply(2).value; try { // We cover only active payment methods. Retired ones will not be found by getActivePaymentMethodById. - String paymentMethodId = getPaymentMethod(); + String paymentMethodId = getPaymentMethodId(); Optional optionalPaymentMethod = PaymentMethod.getActivePaymentMethod(paymentMethodId); if (optionalPaymentMethod.isPresent()) { maxTradeLimit = optionalPaymentMethod.get().getMaxTradeLimitAsCoin(currency).value; diff --git a/core/src/main/java/bisq/core/trade/statistics/TradeStatisticsForJson.java b/core/src/main/java/bisq/core/trade/statistics/TradeStatisticsForJson.java index 34fde08f83..730930e1c4 100644 --- a/core/src/main/java/bisq/core/trade/statistics/TradeStatisticsForJson.java +++ b/core/src/main/java/bisq/core/trade/statistics/TradeStatisticsForJson.java @@ -52,7 +52,7 @@ public final class TradeStatisticsForJson { public TradeStatisticsForJson(TradeStatistics3 tradeStatistics) { this.currency = tradeStatistics.getCurrency(); - this.paymentMethod = tradeStatistics.getPaymentMethod(); + this.paymentMethod = tradeStatistics.getPaymentMethodId(); this.tradePrice = tradeStatistics.getPrice(); this.tradeAmount = tradeStatistics.getAmount(); this.tradeDate = tradeStatistics.getDateAsLong(); diff --git a/desktop/src/main/java/bisq/desktop/main/market/MarketView.java b/desktop/src/main/java/bisq/desktop/main/market/MarketView.java index 66f9d66171..dee00d6b1f 100644 --- a/desktop/src/main/java/bisq/desktop/main/market/MarketView.java +++ b/desktop/src/main/java/bisq/desktop/main/market/MarketView.java @@ -200,7 +200,7 @@ public class MarketView extends ActivatableView { .append("Price: ").append(FormattingUtils.formatPrice(tradeStatistics3.getTradePrice())).append("\n") .append("Amount: ").append(formatter.formatCoin(tradeStatistics3.getTradeAmount())).append("\n") .append("Volume: ").append(VolumeUtil.formatVolume(tradeStatistics3.getTradeVolume())).append("\n") - .append("Payment method: ").append(Res.get(tradeStatistics3.getPaymentMethod())).append("\n") + .append("Payment method: ").append(Res.get(tradeStatistics3.getPaymentMethodId())).append("\n") .append("ReferralID: ").append(tradeStatistics3.getExtraDataMap().get(OfferPayload.REFERRAL_ID)); return sb.toString(); }) diff --git a/desktop/src/main/java/bisq/desktop/main/market/trades/TradeStatistics3ListItem.java b/desktop/src/main/java/bisq/desktop/main/market/trades/TradeStatistics3ListItem.java index f15fe7f438..db4fdb4762 100644 --- a/desktop/src/main/java/bisq/desktop/main/market/trades/TradeStatistics3ListItem.java +++ b/desktop/src/main/java/bisq/desktop/main/market/trades/TradeStatistics3ListItem.java @@ -83,7 +83,7 @@ public class TradeStatistics3ListItem { public String getPaymentMethodString() { if (paymentMethodString == null) { - paymentMethodString = tradeStatistics3 != null ? Res.get(tradeStatistics3.getPaymentMethod()) : ""; + paymentMethodString = tradeStatistics3 != null ? Res.get(tradeStatistics3.getPaymentMethodId()) : ""; } return paymentMethodString; }