Socket
Socket
Sign inDemoInstall

tso-data-models

Package Overview
Dependencies
Maintainers
1
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tso-data-models - npm Package Compare versions

Comparing version 1.0.118 to 1.0.119

1

lib/models/epoch/AssetSubmission.d.ts

@@ -10,3 +10,4 @@ export declare class AssetSubmission {

getSubmitPriceHash(tsoAddress: string): string;
formatPrice(): void;
}
//# sourceMappingURL=AssetSubmission.d.ts.map

@@ -20,2 +20,23 @@ "use strict";

};
AssetSubmission.prototype.formatPrice = function () {
var str = this.price.toString();
var numArray = str.split('.');
var beforeDecimal = numArray[0];
var afterDecimal = numArray[1];
var rightSide;
if (afterDecimal.length > 5) {
rightSide = afterDecimal.substring(0, 5);
}
else if (afterDecimal.length < 5) {
var digitsToAdd = 5 - afterDecimal.length;
rightSide = afterDecimal;
for (var i = 0; i < digitsToAdd; i++) {
rightSide = rightSide + "0";
}
}
else {
rightSide = afterDecimal;
}
this.price = parseInt("" + beforeDecimal + afterDecimal);
};
return AssetSubmission;

@@ -22,0 +43,0 @@ }());

2

package.json
{
"name": "tso-data-models",
"version": "1.0.118",
"version": "1.0.119",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -29,2 +29,21 @@ import { BigNumber, ethers } from "ethers";

}
formatPrice() {
const str = this.price.toString();
const numArray = str.split('.');
const beforeDecimal = numArray[0];
const afterDecimal = numArray[1];
let rightSide;
if (afterDecimal.length > 5) {
rightSide = afterDecimal.substring(0, 5);
} else if (afterDecimal.length < 5) {
const digitsToAdd = 5 - afterDecimal.length;
rightSide = afterDecimal;
for (let i = 0; i < digitsToAdd; i++) {
rightSide = `${rightSide}0`;
}
} else {
rightSide = afterDecimal;
}
this.price = parseInt(`${beforeDecimal}${afterDecimal}`);
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc