Skip to content

Commit

Permalink
Simplify TradeUtil#getPaymentMethodNameWithCountryCode
Browse files Browse the repository at this point in the history
These changes were requested in review of PR
bisq-network#4699
  • Loading branch information
ghubstan committed Oct 30, 2020
1 parent 0656c57 commit f764e9f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions core/src/main/java/bisq/core/trade/TradeUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,13 @@ public String getMarketDescription(Trade trade) {
}

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

/**
Expand Down

0 comments on commit f764e9f

Please sign in to comment.