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

web3-utils

Package Overview
Dependencies
Maintainers
4
Versions
494
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-utils - npm Package Compare versions

Comparing version 1.7.4-rc.0 to 1.7.4-rc.1

13

lib/utils.js

@@ -472,4 +472,15 @@ /*

};
// 1.x currently accepts 0x... strings, bn.js after update doesn't. it would be a breaking change
var BNwrapped = function (value) {
// check negative
if (typeof value == "string" && value.includes("0x")) {
const [negative, hexValue] = value.toLocaleLowerCase().startsWith('-') ? ["-", value.slice(3)] : ["", value.slice(2)];
return new BN(negative + hexValue, 16);
}
else {
return new BN(value);
}
};
module.exports = {
BN: BN,
BN: BNwrapped,
isBN: isBN,

@@ -476,0 +487,0 @@ isBigNumber: isBigNumber,

6

package.json
{
"name": "web3-utils",
"version": "1.7.4-rc.0",
"version": "1.7.4-rc.1",
"description": "Collection of utility functions used in web3.js.",

@@ -17,3 +17,3 @@ "repository": "https://github.com/ethereum/web3.js/tree/1.x/packages/web3-utils",

"dependencies": {
"bn.js": "^4.11.9",
"bn.js": "^5.2.1",
"ethereum-bloom-filters": "^1.0.6",

@@ -30,3 +30,3 @@ "ethereumjs-util": "^7.1.0",

},
"gitHead": "e3b2e8eadbdf825acfbd5c4cbb5d0ee7e1540307"
"gitHead": "a286ab3a0a7866b88c206fd3d6f17033209f52a8"
}

@@ -537,4 +537,16 @@ /*

// 1.x currently accepts 0x... strings, bn.js after update doesn't. it would be a breaking change
var BNwrapped = function (value) {
// check negative
if (typeof value == "string" && value.includes("0x")) {
const [negative, hexValue] = value.toLocaleLowerCase().startsWith('-') ? ["-", value.slice(3)] : ["", value.slice(2)];
return new BN(negative + hexValue, 16);
}
else {
return new BN(value);
}
};
module.exports = {
BN: BN,
BN: BNwrapped,
isBN: isBN,

@@ -541,0 +553,0 @@ isBigNumber: isBigNumber,

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