aboutsummaryrefslogtreecommitdiff
path: root/src/modules/commerce
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/commerce')
-rw-r--r--src/modules/commerce/index.ts10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/modules/commerce/index.ts b/src/modules/commerce/index.ts
index 088112c1..99515463 100644
--- a/src/modules/commerce/index.ts
+++ b/src/modules/commerce/index.ts
@@ -67,14 +67,10 @@ export class CommerceModule {
return `${symbol}${0.0}`;
}
- const randValue = this.faker.datatype.number({ max: max, min: min });
+ // TODO @Shinigami92 2022-11-24: https://github.com/faker-js/faker/issues/350
+ const randValue = this.faker.number.int({ min, max });
- return (
- symbol +
- (Math.round(randValue * Math.pow(10, dec)) / Math.pow(10, dec)).toFixed(
- dec
- )
- );
+ return symbol + randValue.toFixed(dec);
}
/**