From c5016d7bad1da7a1c3b82524c98d2a9449172d41 Mon Sep 17 00:00:00 2001 From: "m.ray" <16125548+MadalinaRaicu@users.noreply.github.com> Date: Mon, 18 Jul 2022 10:49:29 +0200 Subject: [PATCH] fix: use order validation update in simple trading app - changed invalid message and when disabled (#780) --- .../src/app/components/deal-ticket/deal-ticket-steps.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/simple-trading-app/src/app/components/deal-ticket/deal-ticket-steps.tsx b/apps/simple-trading-app/src/app/components/deal-ticket/deal-ticket-steps.tsx index db2ae968d..e8675cf0a 100644 --- a/apps/simple-trading-app/src/app/components/deal-ticket/deal-ticket-steps.tsx +++ b/apps/simple-trading-app/src/app/components/deal-ticket/deal-ticket-steps.tsx @@ -56,7 +56,7 @@ export const DealTicketSteps = ({ market }: DealTicketMarketProps) => { const orderType = watch('type'); const orderTimeInForce = watch('timeInForce'); - const invalidText = useOrderValidation({ + const { message: invalidText, isDisabled } = useOrderValidation({ step, market, orderType, @@ -183,7 +183,7 @@ export const DealTicketSteps = ({ market }: DealTicketMarketProps) => { className="w-full mb-8" variant="primary" type="submit" - disabled={transactionStatus === 'pending' || !!invalidText} + disabled={transactionStatus === 'pending' || isDisabled} data-testid="place-order" > {transactionStatus === 'pending'