fix: use order validation update in simple trading app - changed invalid message and when disabled (#780)
This commit is contained in:
parent
462ccc93c5
commit
c5016d7bad
@ -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'
|
||||||
|
Loading…
Reference in New Issue
Block a user