mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-07 06:32:47 -04:00
Fix wrong equal check, check for cryptocurrency before fiat
This commit is contained in:
parent
37c7993d19
commit
42cbe6e2ca
1 changed files with 4 additions and 4 deletions
|
@ -119,16 +119,16 @@ public class PriceFeed {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCurrencyCode(String currencyCode) {
|
public void setCurrencyCode(String currencyCode) {
|
||||||
if (this.currencyCode != currencyCode) {
|
if (this.currencyCode == null || !this.currencyCode.equals(currencyCode)) {
|
||||||
this.currencyCode = currencyCode;
|
this.currencyCode = currencyCode;
|
||||||
currencyCodeProperty.set(currencyCode);
|
currencyCodeProperty.set(currencyCode);
|
||||||
applyPrice();
|
applyPrice();
|
||||||
|
|
||||||
if (CurrencyUtil.isFiatCurrency(currencyCode)) {
|
if (CurrencyUtil.isCryptoCurrency(currencyCode)) {
|
||||||
requestPrice(fiatPriceProvider);
|
|
||||||
} else {
|
|
||||||
// Poloniex does not support calls for one currency just for all which is quite a bit of data
|
// Poloniex does not support calls for one currency just for all which is quite a bit of data
|
||||||
requestAllPrices(cryptoCurrenciesPriceProvider, this::applyPrice);
|
requestAllPrices(cryptoCurrenciesPriceProvider, this::applyPrice);
|
||||||
|
} else {
|
||||||
|
requestPrice(fiatPriceProvider);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue