mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-29 09:07:27 -04:00
fix updating price indicator when price is N/A
This commit is contained in:
parent
f2a89108e8
commit
8a3e50f1d9
1 changed files with 5 additions and 1 deletions
|
@ -124,7 +124,11 @@ public class MarketPricePresentation {
|
|||
|
||||
marketPriceBinding = EasyBind.combine(
|
||||
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) -> {
|
||||
if (newValue != null && !newValue.equals(oldValue)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue