New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gridplus-sdk

Package Overview
Dependencies
Maintainers
1
Versions
182
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gridplus-sdk - npm Package Compare versions

Comparing version 0.7.21 to 0.7.22

2

package.json
{
"name": "gridplus-sdk",
"version": "0.7.21",
"version": "0.7.22",
"description": "SDK to interact with GridPlus Lattice1 device",

@@ -5,0 +5,0 @@ "scripts": {

@@ -434,5 +434,6 @@ // Utils for Ethereum transactions. This is effecitvely a shim of ethereumjs-util, which

// For null values, return a 0-sized buffer
if (x === null || x === 0) return Buffer.alloc(0);
if (x === null) return Buffer.alloc(0);
const isNumber = typeof x === 'number' || isBase10NumStr(x);
// Otherwise try to get this converted to a hex string
if (typeof x === 'number' || isBase10NumStr(x)) {
if (isNumber) {
// If this is a number or a base-10 number string, convert it to hex

@@ -446,3 +447,3 @@ x = `${new BN(x).toString(16)}`;

if (x.length % 2 > 0) x = `0${x}`;
if (x === '00')
if (x === '00' && !isNumber)
return Buffer.alloc(0);

@@ -630,4 +631,2 @@ return Buffer.from(x, 'hex');

data = ensureHexBuffer(data);
if (data.length === 0)
throw new Error('"bytes" type must contain at least one byte in value');
} else if (type.slice(0, 5) === 'bytes') {

@@ -634,0 +633,0 @@ // Fixed sizes bytes need to be buffer type. We also add some sanity checks.

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