Simplify TradeUtil#getPaymentMethodNameWithCountryCode

These changes were requested in review of PR
https://github.com/bisq-network/bisq/pull/4699
This commit is contained in:
ghubstan 2020-10-30 11:15:39 -03:00
parent 0656c57d39
commit f764e9feb0
No known key found for this signature in database
GPG key ID: E35592D6800A861E

View file

@ -164,14 +164,13 @@ public class TradeUtil {
}
public String getPaymentMethodNameWithCountryCode(Trade trade) {
String paymentMethodDescription = "";
if (trade != null) {
Offer offer = trade.getOffer();
checkNotNull(offer);
checkNotNull(offer.getPaymentMethod());
paymentMethodDescription = offer.getPaymentMethodNameWithCountryCode();
}
return paymentMethodDescription;
if (trade == null)
return "";
Offer offer = trade.getOffer();
checkNotNull(offer);
checkNotNull(offer.getPaymentMethod());
return offer.getPaymentMethodNameWithCountryCode();
}
/**