fix(trading): update step on market dp (#2972)
This commit is contained in:
parent
e4bf61c2e2
commit
d95fdca0d4
@ -10,7 +10,9 @@ const MIN_FRACTION_DIGITS = 2;
|
||||
const MAX_FRACTION_DIGITS = 20;
|
||||
|
||||
export function toDecimal(numberOfDecimals: number) {
|
||||
return 1 / Math.pow(10, numberOfDecimals);
|
||||
return new BigNumber(1)
|
||||
.dividedBy(Math.pow(10, numberOfDecimals))
|
||||
.toString(10);
|
||||
}
|
||||
|
||||
export function toBigNum(
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { t } from '../i18n';
|
||||
|
||||
export const validateAmount = (step: number, field: string) => {
|
||||
export const validateAmount = (step: number | string, field: string) => {
|
||||
const [, stepDecimals = ''] = String(step).split('.');
|
||||
|
||||
return (value: string) => {
|
||||
|
Loading…
Reference in New Issue
Block a user