mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-11-17 08:17:57 +00:00
fix npe in offer payment account selection
This commit is contained in:
parent
5aba26ff82
commit
02eb2fb005
1 changed files with 3 additions and 3 deletions
|
@ -255,10 +255,10 @@ public abstract class MutableOfferDataModel extends OfferDataModel {
|
|||
|
||||
@NotNull
|
||||
private Optional<PaymentAccount> getAnyPaymentAccount() {
|
||||
if (CurrencyUtil.isTraditionalCurrency(tradeCurrency.getCode())) {
|
||||
return paymentAccounts.stream().filter(paymentAccount1 -> !paymentAccount1.getPaymentMethod().isCrypto()).findAny();
|
||||
if (CurrencyUtil.isFiatCurrency(tradeCurrency.getCode())) {
|
||||
return paymentAccounts.stream().filter(paymentAccount1 -> paymentAccount1.isFiat()).findAny();
|
||||
} else {
|
||||
return paymentAccounts.stream().filter(paymentAccount1 -> paymentAccount1.getPaymentMethod().isCrypto() &&
|
||||
return paymentAccounts.stream().filter(paymentAccount1 -> !paymentAccount1.isFiat() &&
|
||||
paymentAccount1.getTradeCurrency().isPresent() &&
|
||||
!Objects.equals(paymentAccount1.getTradeCurrency().get().getCode(), GUIUtil.TOP_CRYPTO.getCode())).findAny();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue