tso-data-models
Advanced tools
Comparing version 1.0.137 to 1.0.138
@@ -9,2 +9,3 @@ import { BigNumber } from "ethers"; | ||
constructor(epochNumber: number, assetName: string, assetIndex: number, price: number); | ||
getRandomInt(): number; | ||
saveObject(): Record<string, any>; | ||
@@ -11,0 +12,0 @@ getSubmitPriceHash(tsoAddress: string): string; |
@@ -16,4 +16,9 @@ "use strict"; | ||
this.price = ethers_1.BigNumber.from(initialFormat); | ||
this.random = Math.floor(Math.random()); | ||
this.random = this.getRandomInt(); | ||
} | ||
AssetSubmission.prototype.getRandomInt = function () { | ||
var min = Math.ceil(1); | ||
var max = Math.floor(1000000); | ||
return Math.floor(Math.random() * (max - min)); | ||
}; | ||
AssetSubmission.prototype.saveObject = function () { | ||
@@ -20,0 +25,0 @@ return (0, class_transformer_1.classToPlain)(this); |
{ | ||
"name": "tso-data-models", | ||
"version": "1.0.137", | ||
"version": "1.0.138", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -22,7 +22,14 @@ import { BigNumber, ethers } from "ethers"; | ||
} | ||
this.price = BigNumber.from(initialFormat); | ||
this.random = Math.floor(Math.random()); | ||
this.random = this.getRandomInt(); | ||
} | ||
getRandomInt() { | ||
let min = Math.ceil(1); | ||
let max = Math.floor(1000000); | ||
return Math.floor(Math.random() * (max - min)); | ||
} | ||
saveObject(): Record<string, any> { | ||
@@ -29,0 +36,0 @@ return classToPlain(this); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
145306
2139