From bad26de0b16b3e20e1c13b95273ee61cff215342 Mon Sep 17 00:00:00 2001 From: Rui Date: Fri, 12 Apr 2024 11:14:37 -0700 Subject: [PATCH] Fix an issue of order/fill status display --- .../portfolio/orderdetails/DydxOrderDetailsViewModel.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/v4/feature/portfolio/src/main/java/exchange/dydx/trading/feature/portfolio/orderdetails/DydxOrderDetailsViewModel.kt b/v4/feature/portfolio/src/main/java/exchange/dydx/trading/feature/portfolio/orderdetails/DydxOrderDetailsViewModel.kt index fe1e0789..3e96ac54 100644 --- a/v4/feature/portfolio/src/main/java/exchange/dydx/trading/feature/portfolio/orderdetails/DydxOrderDetailsViewModel.kt +++ b/v4/feature/portfolio/src/main/java/exchange/dydx/trading/feature/portfolio/orderdetails/DydxOrderDetailsViewModel.kt @@ -52,11 +52,11 @@ class DydxOrderDetailsViewModel @Inject constructor( abacusStateManager.state.marketMap, abacusStateManager.state.assetMap, ) { fills, orders, marketMap, assetMap -> - if (fills == null || orders == null || marketMap == null || assetMap == null) { + if (marketMap == null || assetMap == null) { return@combine null } - val fill = fills.firstOrNull { it.id == orderOrFillId } - val order = orders.firstOrNull { it.id == orderOrFillId } + val fill = fills?.firstOrNull { it.id == orderOrFillId } + val order = orders?.firstOrNull { it.id == orderOrFillId } if (fill != null) { createFillViewState(fill, marketMap, assetMap) } else if (order != null) {