From 20b34d1dc6be35d6c2f485f165c71f58dfcf096c Mon Sep 17 00:00:00 2001 From: Lucas Werey Date: Fri, 10 May 2024 11:26:37 +0200 Subject: [PATCH] fix(llm): fix cosmos error message for stake --- .changeset/four-insects-notice.md | 5 +++++ .../families/cosmos/shared/02-SelectAmount.tsx | 15 ++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 .changeset/four-insects-notice.md 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 (