Skip to content

Commit

Permalink
Fix an issue of order/fill status display
Browse files Browse the repository at this point in the history
  • Loading branch information
ruixhuang committed Apr 12, 2024
1 parent d97a8f7 commit bad26de
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit bad26de

Please sign in to comment.