feat(trading): remove required, fix oco

This commit is contained in:
Madalina Raicu 2024-03-05 15:34:39 +00:00
parent 09d61438b5
commit 1a27e89c60
No known key found for this signature in database
GPG Key ID: 688B7B31149C1DCD
2 changed files with 1 additions and 9 deletions

View File

@ -84,7 +84,6 @@ export const DealTicketPriceTakeProfitStopLoss = ({
name="takeProfit" name="takeProfit"
control={control} control={control}
rules={{ rules={{
required: t('You need provide a take profit price'),
min: { min: {
value: priceStep, value: priceStep,
message: t( message: t(
@ -138,7 +137,6 @@ export const DealTicketPriceTakeProfitStopLoss = ({
name="stopLoss" name="stopLoss"
control={control} control={control}
rules={{ rules={{
required: t('You need provide a stop loss price'),
min: { min: {
value: priceStep, value: priceStep,
message: t('Price cannot be lower than {{priceStep}}', { message: t('Price cannot be lower than {{priceStep}}', {

View File

@ -112,13 +112,7 @@ export const mapFormValuesToStopOrdersSubmission = (
decimalPlaces decimalPlaces
); );
let oppositeStopOrderSetup: StopOrderSetup | undefined = undefined; let oppositeStopOrderSetup: StopOrderSetup | undefined = undefined;
if ( if (data.oco && data.ocoType && data.ocoSize && data.ocoTimeInForce) {
data.oco &&
data.ocoType &&
data.ocoPrice &&
data.ocoSize &&
data.ocoTimeInForce
) {
oppositeStopOrderSetup = { oppositeStopOrderSetup = {
orderSubmission: mapFormValuesToOrderSubmission( orderSubmission: mapFormValuesToOrderSubmission(
{ {