fix: 1644 edit order dialog default to existing price and change price label (#1695)
* fix: #1644 default to existing price and change label * fix: #1644 fix formatting
This commit is contained in:
parent
37ecb0d526
commit
4d8abeb2a3
@ -40,7 +40,14 @@ export const OrderEditDialog = ({
|
||||
register,
|
||||
formState: { errors },
|
||||
handleSubmit,
|
||||
} = useForm<FormFields>();
|
||||
} = useForm<FormFields>({
|
||||
defaultValues: {
|
||||
entryPrice: addDecimalsFormatNumber(
|
||||
order.price,
|
||||
order.market?.decimalPlaces ?? 0
|
||||
),
|
||||
},
|
||||
});
|
||||
|
||||
const step = toDecimal(order.market?.decimalPlaces ?? 0);
|
||||
|
||||
@ -92,7 +99,7 @@ export const OrderEditDialog = ({
|
||||
data-testid="edit-order"
|
||||
className="w-1/2 mt-4"
|
||||
>
|
||||
<FormGroup label={t('Entry price')} labelFor="entryPrice">
|
||||
<FormGroup label={t('Price')} labelFor="entryPrice">
|
||||
<Input
|
||||
type="number"
|
||||
step={step}
|
||||
|
@ -9,6 +9,7 @@
|
||||
"postinstall": "husky install && yarn tsc -b tools/executors/next && yarn tsc -b tools/executors/webpack",
|
||||
"test:all": "nx run-many --all --target=test",
|
||||
"build:all": "nx run-many --all --target=build",
|
||||
"lint:all": "nx run-many --all --target=lint",
|
||||
"vegacapsule": "vegacapsule network bootstrap --config-path=../frontend-monorepo/vegacapsule/config.hcl"
|
||||
},
|
||||
"engines": {
|
||||
|
Loading…
Reference in New Issue
Block a user