diff --git a/.changeset/four-insects-notice.md b/.changeset/four-insects-notice.md new file mode 100644 index 000000000000..b29cc45c72b6 --- /dev/null +++ b/.changeset/four-insects-notice.md @@ -0,0 +1,5 @@ +--- +"live-mobile": major +--- + +Fix error message for cosmos staking. It was showing minimum amount : 0000 when we wanted to stake more than the current balance diff --git a/apps/ledger-live-mobile/src/families/cosmos/shared/02-SelectAmount.tsx b/apps/ledger-live-mobile/src/families/cosmos/shared/02-SelectAmount.tsx index b2df2d0d2fea..1492447501ca 100644 --- a/apps/ledger-live-mobile/src/families/cosmos/shared/02-SelectAmount.tsx +++ b/apps/ledger-live-mobile/src/families/cosmos/shared/02-SelectAmount.tsx @@ -126,6 +126,13 @@ function DelegationAmount({ navigation, route }: Props) { behaviorParam = "padding"; } + const errorMessageKey = + isNotEnoughBalance || isAmountOutOfRange + ? "errors.NotEnoughBalance.title" + : value.gte(min) + ? "cosmos.delegation.flow.steps.amount.minAmount" + : "cosmos.delegation.flow.steps.amount.incorrectAmount"; + return (