mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
fix updating price indicator when price is N/A
This commit is contained in:
parent
f2a89108e8
commit
8a3e50f1d9
@ -124,7 +124,11 @@ public class MarketPricePresentation {
|
|||||||
|
|
||||||
marketPriceBinding = EasyBind.combine(
|
marketPriceBinding = EasyBind.combine(
|
||||||
marketPriceCurrencyCode, marketPrice,
|
marketPriceCurrencyCode, marketPrice,
|
||||||
(currencyCode, price) -> CurrencyUtil.getCurrencyPair(currencyCode) + ": " + price);
|
(currencyCode, price) -> {
|
||||||
|
MarketPrice currentPrice = priceFeedService.getMarketPrice(currencyCode);
|
||||||
|
String currentPriceStr = currentPrice == null ? Res.get("shared.na") : FormattingUtils.formatMarketPrice(currentPrice.getPrice(), currencyCode);
|
||||||
|
return CurrencyUtil.getCurrencyPair(currencyCode) + ": " + currentPriceStr;
|
||||||
|
});
|
||||||
|
|
||||||
marketPriceBinding.subscribe((observable, oldValue, newValue) -> {
|
marketPriceBinding.subscribe((observable, oldValue, newValue) -> {
|
||||||
if (newValue != null && !newValue.equals(oldValue)) {
|
if (newValue != null && !newValue.equals(oldValue)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user