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.130 to 1.0.131

8

lib/models/epoch/AssetSubmission.js

@@ -23,5 +23,8 @@ "use strict";

var _a;
console.log('Price ', this.price);
if (this.price == "0") {
console.log('Price1111 ', this.price);
}
else if (!this.price.includes('.')) {
console.log('Price1122222211 ', this.price);
var priceSplit = (_a = this.price) === null || _a === void 0 ? void 0 : _a.split('.');

@@ -32,7 +35,11 @@ var beforeDecimal = priceSplit[0];

//Remove Leading Zero
console.log('beforeDecimal ', beforeDecimal);
console.log('afterDecimal ', afterDecimal);
if (beforeDecimal.startsWith('0')) {
beforeDecimal = beforeDecimal.substr(1, beforeDecimal.length);
console.log('beforeDecimal ', beforeDecimal);
}
// If too many digits truncate
if ((afterDecimal === null || afterDecimal === void 0 ? void 0 : afterDecimal.length) > 5) {
console.log('digitsdigits ');
rightSide = afterDecimal === null || afterDecimal === void 0 ? void 0 : afterDecimal.substring(0, 5);

@@ -42,2 +49,3 @@ // Number is too few DIgits

else if (afterDecimal.length < 5) {
console.log('fewfew ');
var digitsToAdd = 5 - (afterDecimal === null || afterDecimal === void 0 ? void 0 : afterDecimal.length);

@@ -44,0 +52,0 @@ rightSide = afterDecimal;

2

package.json
{
"name": "tso-data-models",
"version": "1.0.130",
"version": "1.0.131",
"description": "",

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

@@ -31,6 +31,8 @@ import { BigNumber, ethers } from "ethers";

formatPrice() {
console.log('Price ', this.price)
if (this.price == "0") {
console.log('Price1111 ', this.price)
} else if (!this.price.includes('.')) {
console.log('Price1122222211 ', this.price)
const priceSplit = this.price?.split('.');

@@ -41,7 +43,11 @@ let beforeDecimal = priceSplit[0];

//Remove Leading Zero
console.log('beforeDecimal ', beforeDecimal)
console.log('afterDecimal ', afterDecimal)
if (beforeDecimal.startsWith('0')) {
beforeDecimal = beforeDecimal.substr(1, beforeDecimal.length);
console.log('beforeDecimal ', beforeDecimal)
}
// If too many digits truncate
if (afterDecimal?.length > 5) {
console.log('digitsdigits ')
rightSide = afterDecimal?.substring(0, 5);

@@ -51,2 +57,3 @@

} else if (afterDecimal.length < 5) {
console.log('fewfew ')
const digitsToAdd = 5 - afterDecimal?.length;

@@ -53,0 +60,0 @@ rightSide = 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