Skip to content

Commit

Permalink
Backend might send "USDC-USD" along with the Abacus one.. (#258)
Browse files Browse the repository at this point in the history
So, we have to make the id unique to avoid the list crash.
  • Loading branch information
ruixhuang authored Oct 23, 2024
1 parent 0eecc11 commit f33f127
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import exchange.dydx.trading.feature.vault.components.DydxVaultPositionItemView
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.distinctUntilChanged
import java.util.UUID
import javax.inject.Inject
import kotlin.math.absoluteValue

Expand Down Expand Up @@ -70,7 +71,7 @@ class DydxVaultViewModel @Inject constructor(
val marketId = position.marketId ?: return null
return DydxVaultPositionItemView.ViewState(
localizer = localizer,
id = marketId,
id = marketId + UUID.randomUUID(),
logoUrl = null,
assetName = "USDC",
market = marketId,
Expand Down

0 comments on commit f33f127

Please sign in to comment.