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) {