Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ruixhuang committed Sep 19, 2024
1 parent a38e1ed commit e50e95c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ fun Preview_DydxProfileView() {
object DydxProfileView : DydxComponent {
data class ViewState(
val localizer: LocalizerProtocol,
val alerts: Boolean,
val hasAlerts: Boolean,
) {
companion object {
val preview = ViewState(
localizer = MockLocalizer(),
alerts = true,
hasAlerts = true,
)
}
}
Expand Down Expand Up @@ -84,7 +84,7 @@ object DydxProfileView : DydxComponent {
item(key = "buttons") {
DydxProfileButtonsView.Content(Modifier.padding(horizontal = ThemeShapes.HorizontalPadding))
}
if (state?.alerts == true) {
if (state?.hasAlerts == true) {
item(key = "vault") {
DydxProfileAlertsView.Content(Modifier.padding(horizontal = ThemeShapes.HorizontalPadding))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class DydxProfileViewModel @Inject constructor(
private fun createViewState(): DydxProfileView.ViewState {
return DydxProfileView.ViewState(
localizer = localizer,
alerts = featureFlags.isFeatureEnabled(DydxFeatureFlag.vault_enabled, default = false),
hasAlerts = featureFlags.isFeatureEnabled(DydxFeatureFlag.vault_enabled, default = false),
)
}
}

0 comments on commit e50e95c

Please sign in to comment.