Skip to content

Commit

Permalink
remove reset and fix quantity value
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarnadas committed Nov 28, 2024
1 parent 155dec0 commit 0b5b0d5
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions app/components/CreateOrder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ export const CreateOrder: FC<{
);
const [_0, customNotification] = useNotifications();

useEffect(() => {
reset();
console.log('[reset]');
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [formattedOrder.order_type]);

if (symbolsInfo.isNil) {
return <Spinner />;
}
Expand Down Expand Up @@ -255,10 +249,7 @@ export const CreateOrder: FC<{
name="order_quantity"
hasError={!!hasError('order_quantity')}
onValueChange={(value) => {
setValue(
'order_quantity',
formattedOrder.side === OrderSide.BUY ? value.toString() : `-${value.toString()}`
);
setValue('order_quantity', value.toString());
}}
/>
{renderFormError(hasError('order_quantity'))}
Expand Down

0 comments on commit 0b5b0d5

Please sign in to comment.