mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-23 04:29:22 +00: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(
|
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 a new issue