mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Rename getPaymentMethod to getPaymentMethodId
This commit is contained in:
parent
94857a6261
commit
a495072694
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
})
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user