fix: use order validation update in simple trading app - changed invalid message and when disabled (#780)

This commit is contained in:
m.ray 2022-07-18 10:49:29 +02:00 committed by GitHub
parent 462ccc93c5
commit c5016d7bad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,7 @@ export const DealTicketSteps = ({ market }: DealTicketMarketProps) => {
const orderType = watch('type'); const orderType = watch('type');
const orderTimeInForce = watch('timeInForce'); const orderTimeInForce = watch('timeInForce');
const invalidText = useOrderValidation({ const { message: invalidText, isDisabled } = useOrderValidation({
step, step,
market, market,
orderType, orderType,
@ -183,7 +183,7 @@ export const DealTicketSteps = ({ market }: DealTicketMarketProps) => {
className="w-full mb-8" className="w-full mb-8"
variant="primary" variant="primary"
type="submit" type="submit"
disabled={transactionStatus === 'pending' || !!invalidText} disabled={transactionStatus === 'pending' || isDisabled}
data-testid="place-order" data-testid="place-order"
> >
{transactionStatus === 'pending' {transactionStatus === 'pending'