Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External links #9

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion v4/app/build/gmpAppId.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ object DydxProfileLaunchIncentivesView : DydxComponent {
val localizer: LocalizerProtocol,
val season: String?,
val points: String?,
val aboutAction: () -> Unit = {},
val leaderboardAction: () -> Unit = {},
) {
companion object {
val preview = ViewState(
Expand Down Expand Up @@ -160,7 +162,7 @@ object DydxProfileLaunchIncentivesView : DydxComponent {
modifier = Modifier
.padding(vertical = ThemeShapes.VerticalPadding)
.width(120.dp),
action = {},
action = state.aboutAction,
)

Spacer(modifier = Modifier.width(ThemeShapes.HorizontalPadding))
Expand All @@ -171,7 +173,7 @@ object DydxProfileLaunchIncentivesView : DydxComponent {
modifier = Modifier
.padding(vertical = ThemeShapes.VerticalPadding)
.weight(1f),
action = {},
action = state.leaderboardAction,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import exchange.dydx.abacus.protocols.LocalizerProtocol
import exchange.dydx.dydxstatemanager.AbacusStateManagerProtocol
import exchange.dydx.trading.common.DydxViewModel
import exchange.dydx.trading.common.formatter.DydxFormatter
import exchange.dydx.trading.common.navigation.DydxRouter
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.distinctUntilChanged
Expand All @@ -18,6 +19,7 @@ class DydxProfileLaunchIncentivesViewModel @Inject constructor(
private val localizer: LocalizerProtocol,
private val abacusStateManager: AbacusStateManagerProtocol,
private val formatter: DydxFormatter,
private val router: DydxRouter,
) : ViewModel(), DydxViewModel {
val state: Flow<DydxProfileLaunchIncentivesView.ViewState?> =
combine(
Expand All @@ -35,6 +37,12 @@ class DydxProfileLaunchIncentivesViewModel @Inject constructor(
localizer = localizer,
season = season,
points = points,
aboutAction = {
router.navigateTo("https://dydx.exchange/blog/v4-full-trading")
},
leaderboardAction = {
router.navigateTo("https://community.chaoslabs.xyz/dydx-v4/risk/leaderboard")
},
)
}
}
Loading