From 8057e56db1c7de18a45876d07618ec89d9eb55bd Mon Sep 17 00:00:00 2001 From: vinu-deriv Date: Wed, 13 Nov 2024 15:11:14 +0400 Subject: [PATCH] fix: stake error to be displayed when amount is empty --- .../src/AppV2/Components/TradeParameters/Stake/stake.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/trader/src/AppV2/Components/TradeParameters/Stake/stake.tsx b/packages/trader/src/AppV2/Components/TradeParameters/Stake/stake.tsx index 74bfa2a4591d..440cfa9226e5 100644 --- a/packages/trader/src/AppV2/Components/TradeParameters/Stake/stake.tsx +++ b/packages/trader/src/AppV2/Components/TradeParameters/Stake/stake.tsx @@ -110,7 +110,10 @@ const Stake = observer(({ is_minimized }: TTradeParametersProps) => { ? proposal_error_message_2 : proposal_error_message_1) || proposal_error_message; const two_contracts_error = has_both_errors || amount.toString() === '' ? main_error_message : ''; - const stake_error = (has_both_errors ? two_contracts_error : !contract_types[1] && proposal_error_message) || ''; + const stake_error = + (has_both_errors + ? two_contracts_error + : (!contract_types[1] || amount.toString() === '') && proposal_error_message) || ''; const [details, setDetails] = React.useState({ first_contract_payout, max_payout,