mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-20 07:46:05 -04:00
Fix wrong equal check, check for cryptocurrency before fiat
This commit is contained in:
parent
37c7993d19
commit
42cbe6e2ca
@ -119,16 +119,16 @@ public class PriceFeed {
|
||||
}
|
||||
|
||||
public void setCurrencyCode(String currencyCode) {
|
||||
if (this.currencyCode != currencyCode) {
|
||||
if (this.currencyCode == null || !this.currencyCode.equals(currencyCode)) {
|
||||
this.currencyCode = currencyCode;
|
||||
currencyCodeProperty.set(currencyCode);
|
||||
applyPrice();
|
||||
|
||||
if (CurrencyUtil.isFiatCurrency(currencyCode)) {
|
||||
requestPrice(fiatPriceProvider);
|
||||
} else {
|
||||
if (CurrencyUtil.isCryptoCurrency(currencyCode)) {
|
||||
// Poloniex does not support calls for one currency just for all which is quite a bit of data
|
||||
requestAllPrices(cryptoCurrenciesPriceProvider, this::applyPrice);
|
||||
} else {
|
||||
requestPrice(fiatPriceProvider);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user