Rename getPaymentMethod to getPaymentMethodId

This commit is contained in:
chimp1984 2021-11-23 00:39:38 +01:00 committed by Christoph Atteneder
parent 94857a6261
commit a495072694
No known key found for this signature in database
GPG Key ID: CD5DC1C529CDFD3B
4 changed files with 5 additions and 5 deletions

View File

@ -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<PaymentMethod> optionalPaymentMethod = PaymentMethod.getActivePaymentMethod(paymentMethodId);
if (optionalPaymentMethod.isPresent()) {
maxTradeLimit = optionalPaymentMethod.get().getMaxTradeLimitAsCoin(currency).value;

View File

@ -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();

View File

@ -200,7 +200,7 @@ public class MarketView extends ActivatableView<TabPane, Void> {
.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();
})

View File

@ -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;
}