From dc7f8a6c37a7e876d0d7b6b04539f08f7a80402c Mon Sep 17 00:00:00 2001 From: aforaleka Date: Tue, 13 Aug 2024 15:03:52 -0400 Subject: [PATCH] show warning icon in place order CTA only when validation error is unrelated to missing fields --- src/views/forms/TradeForm/PlaceOrderButtonAndReceipt.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/forms/TradeForm/PlaceOrderButtonAndReceipt.tsx b/src/views/forms/TradeForm/PlaceOrderButtonAndReceipt.tsx index 399e89fd7..8b2e2fa37 100644 --- a/src/views/forms/TradeForm/PlaceOrderButtonAndReceipt.tsx +++ b/src/views/forms/TradeForm/PlaceOrderButtonAndReceipt.tsx @@ -101,7 +101,7 @@ export const PlaceOrderButtonAndReceipt = ({ const { fee, price: expectedPrice, reward } = summary ?? {}; - // check if required fields are filled and summary has been calculated + // approximation for whether inputs are filled by whether summary has been calculated const areInputsFilled = fee != null || reward != null; const renderMarginValue = () => { @@ -289,7 +289,7 @@ export const PlaceOrderButtonAndReceipt = ({ type={ButtonType.Submit} action={buttonAction} slotLeft={ - showValidatorErrors ? ( + showValidatorErrors && areInputsFilled ? ( ) : undefined }