mirror of
https://github.com/retoaccess1/haveno-reto.git
synced 2024-12-11 20:33:32 +01:00
fix npe in offer payment account selection
This commit is contained in:
parent
5aba26ff82
commit
02eb2fb005
@ -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 New Issue
Block a user