|
@ -55,6 +55,7 @@ interface TradeProps { |
|
|
leverage?: number; |
|
|
leverage?: number; |
|
|
quantity: string; |
|
|
quantity: string; |
|
|
liquidationPrice?: number; |
|
|
liquidationPrice?: number; |
|
|
|
|
|
canSubmit: boolean; |
|
|
isSubmitting: boolean; |
|
|
isSubmitting: boolean; |
|
|
onQuantityChange: any; |
|
|
onQuantityChange: any; |
|
|
onLongSubmit: (payload: CfdOrderRequestPayload) => void; |
|
|
onLongSubmit: (payload: CfdOrderRequestPayload) => void; |
|
@ -71,6 +72,7 @@ const Trade = ( |
|
|
margin: marginAsNumber, |
|
|
margin: marginAsNumber, |
|
|
leverage, |
|
|
leverage, |
|
|
liquidationPrice: liquidationPriceAsNumber, |
|
|
liquidationPrice: liquidationPriceAsNumber, |
|
|
|
|
|
canSubmit, |
|
|
onLongSubmit, |
|
|
onLongSubmit, |
|
|
order_id, |
|
|
order_id, |
|
|
}: TradeProps, |
|
|
}: TradeProps, |
|
@ -148,14 +150,18 @@ const Trade = ( |
|
|
</GridItem> |
|
|
</GridItem> |
|
|
<GridItem colSpan={1}> |
|
|
<GridItem colSpan={1}> |
|
|
<Center> |
|
|
<Center> |
|
|
<ButtonGroup variant="solid" padding="3" spacing="6"> |
|
|
<ButtonGroup |
|
|
|
|
|
variant="solid" |
|
|
|
|
|
padding="3" |
|
|
|
|
|
spacing="6" |
|
|
|
|
|
> |
|
|
<Button colorScheme="red" size="lg" disabled h={16}> |
|
|
<Button colorScheme="red" size="lg" disabled h={16}> |
|
|
<VStack> |
|
|
<VStack> |
|
|
<Text as="b">Short</Text> |
|
|
<Text as="b">Short</Text> |
|
|
<Text fontSize={"sm"}>{quantity.replace("$", "")}@{askPrice}</Text> |
|
|
<Text fontSize={"sm"}>{quantity.replace("$", "")}@{askPrice}</Text> |
|
|
</VStack> |
|
|
</VStack> |
|
|
</Button> |
|
|
</Button> |
|
|
<Button colorScheme="green" size="lg" onClick={onOpen} h={16}> |
|
|
<Button disabled={!canSubmit} colorScheme="green" size="lg" onClick={onOpen} h={16}> |
|
|
<VStack> |
|
|
<VStack> |
|
|
<Text as="b">Long</Text> |
|
|
<Text as="b">Long</Text> |
|
|
<Text fontSize={"sm"}>{quantity.replace("$", "")}@{askPrice}</Text> |
|
|
<Text fontSize={"sm"}>{quantity.replace("$", "")}@{askPrice}</Text> |
|
|