mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-23 12:39:23 +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
|
@NotNull
|
||||||
private Optional<PaymentAccount> getAnyPaymentAccount() {
|
private Optional<PaymentAccount> getAnyPaymentAccount() {
|
||||||
if (CurrencyUtil.isTraditionalCurrency(tradeCurrency.getCode())) {
|
if (CurrencyUtil.isFiatCurrency(tradeCurrency.getCode())) {
|
||||||
return paymentAccounts.stream().filter(paymentAccount1 -> !paymentAccount1.getPaymentMethod().isCrypto()).findAny();
|
return paymentAccounts.stream().filter(paymentAccount1 -> paymentAccount1.isFiat()).findAny();
|
||||||
} else {
|
} else {
|
||||||
return paymentAccounts.stream().filter(paymentAccount1 -> paymentAccount1.getPaymentMethod().isCrypto() &&
|
return paymentAccounts.stream().filter(paymentAccount1 -> !paymentAccount1.isFiat() &&
|
||||||
paymentAccount1.getTradeCurrency().isPresent() &&
|
paymentAccount1.getTradeCurrency().isPresent() &&
|
||||||
!Objects.equals(paymentAccount1.getTradeCurrency().get().getCode(), GUIUtil.TOP_CRYPTO.getCode())).findAny();
|
!Objects.equals(paymentAccount1.getTradeCurrency().get().getCode(), GUIUtil.TOP_CRYPTO.getCode())).findAny();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue