Only use default currency if payment account available

Fixes #6157
This commit is contained in:
Christoph Atteneder 2022-04-25 09:38:33 +02:00
parent 967acb01c7
commit 6e158c720c
No known key found for this signature in database
GPG Key ID: CD5DC1C529CDFD3B
2 changed files with 3 additions and 2 deletions

View File

@ -134,7 +134,7 @@ public class BtcOfferBookViewModel extends OfferBookViewModel {
TradeCurrency getDefaultTradeCurrency() {
TradeCurrency defaultTradeCurrency = GlobalSettings.getDefaultTradeCurrency();
if (CurrencyUtil.isFiatCurrency(defaultTradeCurrency.getCode())) {
if (CurrencyUtil.isFiatCurrency(defaultTradeCurrency.getCode()) && hasPaymentAccountForCurrency(defaultTradeCurrency)) {
return defaultTradeCurrency;
}

View File

@ -138,7 +138,8 @@ public class OtherOfferBookViewModel extends OfferBookViewModel {
if (!CurrencyUtil.isFiatCurrency(defaultTradeCurrency.getCode()) &&
!defaultTradeCurrency.equals(GUIUtil.BSQ) &&
!defaultTradeCurrency.equals(GUIUtil.TOP_ALTCOIN)) {
!defaultTradeCurrency.equals(GUIUtil.TOP_ALTCOIN) &&
hasPaymentAccountForCurrency(defaultTradeCurrency)) {
return defaultTradeCurrency;
}