diff --git a/libs/deal-ticket/src/components/deal-ticket/deal-ticket-price-tp-sl.tsx b/libs/deal-ticket/src/components/deal-ticket/deal-ticket-price-tp-sl.tsx index 63af20645..6d775b65f 100644 --- a/libs/deal-ticket/src/components/deal-ticket/deal-ticket-price-tp-sl.tsx +++ b/libs/deal-ticket/src/components/deal-ticket/deal-ticket-price-tp-sl.tsx @@ -12,17 +12,12 @@ import { Pill, } from '@vegaprotocol/ui-toolkit'; import { useT } from '../../use-t'; -import { type Side } from '@vegaprotocol/types'; export interface DealTicketPriceTakeProfitStopLossProps { control: Control; market: Market; takeProfitError?: string; stopLossError?: string; - setPrice?: string; - takeProfit?: string; - stopLoss?: string; - side?: Side; quoteName?: string; } @@ -32,10 +27,6 @@ export const DealTicketPriceTakeProfitStopLoss = ({ takeProfitError, stopLossError, quoteName, - setPrice, - takeProfit, - stopLoss, - side, }: DealTicketPriceTakeProfitStopLossProps) => { const t = useT(); const validateAmount = useValidateAmount(); diff --git a/libs/deal-ticket/src/components/deal-ticket/deal-ticket.tsx b/libs/deal-ticket/src/components/deal-ticket/deal-ticket.tsx index 3971deeab..c61cb90df 100644 --- a/libs/deal-ticket/src/components/deal-ticket/deal-ticket.tsx +++ b/libs/deal-ticket/src/components/deal-ticket/deal-ticket.tsx @@ -193,8 +193,6 @@ export const DealTicket = ({ const peakSize = watch('peakSize'); const expiresAt = watch('expiresAt'); const postOnly = watch('postOnly'); - const takeProfit = watch('takeProfit'); - const stopLoss = watch('stopLoss'); useEffect(() => { const size = storedFormValues?.[dealTicketType]?.size; @@ -400,14 +398,15 @@ export const DealTicket = ({ submit({ batchMarketInstructions, }); + } else { + const orderSubmission = mapFormValuesToOrderSubmission( + formValues, + market.id, + market.decimalPlaces, + market.positionDecimalPlaces + ); + submit({ orderSubmission }); } - const orderSubmission = mapFormValuesToOrderSubmission( - formValues, - market.id, - market.decimalPlaces, - market.positionDecimalPlaces - ); - submit({ orderSubmission }); lastSubmitTime.current = now; }, [market, pubKey, submit] @@ -764,10 +763,6 @@ export const DealTicket = ({ takeProfitError={errors.takeProfit?.message} stopLossError={errors.stopLoss?.message} control={control} - setPrice={price} - takeProfit={takeProfit} - stopLoss={stopLoss} - side={side} quoteName={quoteName} /> )}