Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@greymass/eosio

Package Overview
Dependencies
Maintainers
2
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@greymass/eosio - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

4

lib/eosio-core.d.ts
/**
* EOSIO Core v0.1.7
* EOSIO Core v0.1.8
* https://github.com/greymass/eosio-core

@@ -147,3 +147,3 @@ *

* Convert floating point to units according to symbol precision.
* @throws If the resulting units can't be represented in 53 bits.
* Note that the value will be rounded to closest precision.
**/

@@ -150,0 +150,0 @@ convertFloat(float: number): Int64;

{
"name": "@greymass/eosio",
"description": "Library for working with EOSIO blockchains",
"version": "0.1.7",
"version": "0.1.8",
"homepage": "https://github.com/greymass/eosio-core",

@@ -6,0 +6,0 @@ "license": "BSD-3-Clause",

@@ -186,11 +186,6 @@ import BN from 'bn.js'

* Convert floating point to units according to symbol precision.
* @throws If the resulting units can't be represented in 53 bits.
* Note that the value will be rounded to closest precision.
**/
convertFloat(float: number): Int64 {
const p = this.precision
const rv = Math.pow(10, p) * float
if (rv >= 0x20000000000000) {
throw new Error('Conversion looses precision')
}
return Int64.from(rv.toFixed(p).split('.')[0])
return Int64.from(float.toFixed(this.precision).replace('.', ''))
}

@@ -197,0 +192,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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