From ebd3a714a10edba441a969f063414e4d037cea9e Mon Sep 17 00:00:00 2001 From: wjrjerome Date: Wed, 7 Aug 2024 12:45:34 +1000 Subject: [PATCH 1/2] chore: improve the msg when staking amount exceeds the available balance --- src/app/components/Staking/Form/StakingAmount.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/Staking/Form/StakingAmount.tsx b/src/app/components/Staking/Form/StakingAmount.tsx index 244353d2..41a27ddf 100644 --- a/src/app/components/Staking/Form/StakingAmount.tsx +++ b/src/app/components/Staking/Form/StakingAmount.tsx @@ -84,7 +84,7 @@ export const StakingAmount: React.FC = ({ }, { valid: satoshis <= btcWalletBalanceSat, - message: `${errorLabel} must be no more than ${satoshiToBtc(btcWalletBalanceSat)} wallet balance.`, + message: `${errorLabel} exceeds your balance (${satoshiToBtc(btcWalletBalanceSat)})!`, }, { valid: validateDecimalPoints(value), From 811062727af3169902f991fc6da122faec61a52b Mon Sep 17 00:00:00 2001 From: wjrjerome Date: Wed, 7 Aug 2024 21:03:11 +1000 Subject: [PATCH 2/2] add unit to the 'exceeds your balance msg' --- src/app/components/Staking/Form/StakingAmount.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/Staking/Form/StakingAmount.tsx b/src/app/components/Staking/Form/StakingAmount.tsx index 41a27ddf..a680754b 100644 --- a/src/app/components/Staking/Form/StakingAmount.tsx +++ b/src/app/components/Staking/Form/StakingAmount.tsx @@ -84,7 +84,7 @@ export const StakingAmount: React.FC = ({ }, { valid: satoshis <= btcWalletBalanceSat, - message: `${errorLabel} exceeds your balance (${satoshiToBtc(btcWalletBalanceSat)})!`, + message: `${errorLabel} exceeds your balance (${satoshiToBtc(btcWalletBalanceSat)} ${coinName})!`, }, { valid: validateDecimalPoints(value),