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) { public String getPaymentMethodNameWithCountryCode(Trade trade) {
String paymentMethodDescription = ""; if (trade == null)
if (trade != null) { return "";
Offer offer = trade.getOffer();
checkNotNull(offer); Offer offer = trade.getOffer();
checkNotNull(offer.getPaymentMethod()); checkNotNull(offer);
paymentMethodDescription = offer.getPaymentMethodNameWithCountryCode(); checkNotNull(offer.getPaymentMethod());
} return offer.getPaymentMethodNameWithCountryCode();
return paymentMethodDescription;
} }
/** /**