Skip to content

Commit

Permalink
Nomination pool/UI fixes (#1105)
Browse files Browse the repository at this point in the history
* Fix button colors

* Fix start staking more info text

* Fix validation progress restoration after warning confirmation
  • Loading branch information
valentunn authored Sep 11, 2023
1 parent 11f47a3 commit 0cbac41
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class ValidationExecutor : Validatable {
payload = payload,
autoFixPayload = autoFixPayload,
notValidStatus = it,
progressConsumer = progressConsumer,
revalidate = { newPayload ->
scope.launch {
requireValid(
Expand Down Expand Up @@ -102,8 +103,8 @@ class ValidationExecutor : Validatable {

private fun <P, S> createFlowActions(
payload: P,
progressConsumer: ProgressConsumer? = null,
autoFixPayload: (original: P, failureStatus: S) -> P = { original, _ -> original },
progressConsumer: ProgressConsumer?,
autoFixPayload: (original: P, failureStatus: S) -> P,
notValidStatus: ValidationStatus.NotValid<S>,
revalidate: (newPayload: P) -> Unit,
successBlock: (newPayload: P) -> Unit,
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/res/drawable/primary_chip_background.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<item android:state_enabled="false">
<shape android:shape="rectangle">
<solid android:color="@color/button_background_inactive" />
<solid android:color="@color/button_background_inactive_on_gradient" />

<corners android:radius="10dp" />
</shape>
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/res/drawable/secondary_chip_background.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<item android:state_enabled="false">
<shape android:shape="rectangle">
<solid android:color="@color/button_background_inactive" />
<solid android:color="@color/button_background_inactive_on_gradient" />

<corners android:radius="10dp" />
</shape>
Expand Down
3 changes: 2 additions & 1 deletion common/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@
<color name="button_background_approve">#2FC864</color>
<color name="button_background_reject">#E53450</color>
<color name="button_background_inactive_on_gradient">#1A999EC7</color>
<color name="button_background_inactive">#1A999EC7</color>
<color name="button_background_inactive">#181920</color>

<color name="button_wallet_connect_background">#353D67</color>
<color name="wallet_connections_background">#101636</color>

Expand Down
4 changes: 2 additions & 2 deletions common/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@
<string name="start_staking_fragment_governance_participation_with_min_amount_accent">participate in governance</string>

<string name="start_staking_fragment_stake_monitoring_monitor_stake">Monitor your stake</string>
<string name="start_staking_fragment_stake_monitoring">Rewards &amp; staking status vary over time. %s from time to time</string>
<string name="start_staking_fragment_stake_monitoring">Rewards and staking status vary over time. %s from time to time</string>

<string name="start_staking_fragment_more_info">Find out more information about\nMoonbeam staking over at the %s</string>
<string name="start_staking_fragment_more_info">Find out more information about\n%1$s staking over at the %2$s</string>
<string name="start_staking_fragment_more_info_clicable_part">Nova Wiki</string>

<string name="start_staking_fragment_terms_of_use">See %s</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class RuntimeParachainStakingConstantsRepository(

override suspend fun minimumDelegatorStake(chainId: ChainId): BigInteger {
return numberConstantOrNull(chainId, "MinDelegatorStk")
// Starting from runtime 1500, MinDelegatorStk was removed and only MinDelegation remained
// Starting from runtime 2500, MinDelegatorStk was removed and only MinDelegation remained
?: minimumDelegation(chainId)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ class StartStakingLandingViewModel(

return SpannableFormatter.format(
resourceManager.getString(R.string.start_staking_fragment_more_info),
chain.name,
clickablePart
)
}
Expand Down

0 comments on commit 0cbac41

Please sign in to comment.