Skip to content

Commit

Permalink
fix: stake error to be displayed when amount is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
vinu-deriv committed Nov 13, 2024
1 parent 9bc3181 commit 8057e56
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8057e56

Please sign in to comment.