Skip to content

Commit

Permalink
fix short
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarnadas committed Nov 28, 2024
1 parent 7c137c2 commit 155dec0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/components/CreateOrder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,10 @@ export const CreateOrder: FC<{
name="order_quantity"
hasError={!!hasError('order_quantity')}
onValueChange={(value) => {
setValue('order_quantity', value.toString());
setValue(
'order_quantity',
formattedOrder.side === OrderSide.BUY ? value.toString() : `-${value.toString()}`
);
}}
/>
{renderFormError(hasError('order_quantity'))}
Expand Down

0 comments on commit 155dec0

Please sign in to comment.