feat(trading): remove required, fix oco
This commit is contained in:
parent
09d61438b5
commit
1a27e89c60
@ -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}}', {
|
||||||
|
@ -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(
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user