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
501
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 4.3.2-dev.5f6deeb.0 to 4.3.2-dev.60fc197.0

19

lib/commonjs/formatter.js

@@ -121,2 +121,5 @@ "use strict";

}
if (baseType === 'string') {
return String(value);
}
}

@@ -232,3 +235,3 @@ catch (error) {

dataPath.push(key);
const schemaProp = findSchemaByDataPath(schema, dataPath, oneOfPath);
let schemaProp = findSchemaByDataPath(schema, dataPath, oneOfPath);
// If value is a scaler value

@@ -259,2 +262,16 @@ if ((0, web3_validator_1.isNullish)(schemaProp)) {

}
// The following code is basically saying:
// if the schema specifies oneOf, then we are to loop
// over each possible schema and check if they type of the schema specifies format
// and if so we use the oneOfSchemaProp as the schema for formatting
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
if (((schemaProp === null || schemaProp === void 0 ? void 0 : schemaProp.format) === undefined) && ((schemaProp === null || schemaProp === void 0 ? void 0 : schemaProp.oneOf) !== undefined)) {
for (const [_index, oneOfSchemaProp] of schemaProp.oneOf.entries()) {
if (((oneOfSchemaProp === null || oneOfSchemaProp === void 0 ? void 0 : oneOfSchemaProp.format) !== undefined)) {
schemaProp = oneOfSchemaProp;
break;
}
}
;
}
object[key] = (0, exports.convertScalarValue)(value, schemaProp.format, format);

@@ -261,0 +278,0 @@ dataPath.pop();

@@ -117,2 +117,5 @@ /*

}
if (baseType === 'string') {
return String(value);
}
}

@@ -227,3 +230,3 @@ catch (error) {

dataPath.push(key);
const schemaProp = findSchemaByDataPath(schema, dataPath, oneOfPath);
let schemaProp = findSchemaByDataPath(schema, dataPath, oneOfPath);
// If value is a scaler value

@@ -254,2 +257,16 @@ if (isNullish(schemaProp)) {

}
// The following code is basically saying:
// if the schema specifies oneOf, then we are to loop
// over each possible schema and check if they type of the schema specifies format
// and if so we use the oneOfSchemaProp as the schema for formatting
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
if (((schemaProp === null || schemaProp === void 0 ? void 0 : schemaProp.format) === undefined) && ((schemaProp === null || schemaProp === void 0 ? void 0 : schemaProp.oneOf) !== undefined)) {
for (const [_index, oneOfSchemaProp] of schemaProp.oneOf.entries()) {
if (((oneOfSchemaProp === null || oneOfSchemaProp === void 0 ? void 0 : oneOfSchemaProp.format) !== undefined)) {
schemaProp = oneOfSchemaProp;
break;
}
}
;
}
object[key] = convertScalarValue(value, schemaProp.format, format);

@@ -256,0 +273,0 @@ dataPath.pop();

10

package.json
{
"name": "web3-utils",
"sideEffects": false,
"version": "4.3.2-dev.5f6deeb.0+5f6deeb",
"version": "4.3.2-dev.60fc197.0+60fc197",
"description": "Collection of utility functions used in web3.js.",

@@ -68,7 +68,7 @@ "main": "./lib/commonjs/index.js",

"eventemitter3": "^5.0.1",
"web3-errors": "1.2.1-dev.5f6deeb.0+5f6deeb",
"web3-types": "1.7.1-dev.5f6deeb.0+5f6deeb",
"web3-validator": "2.0.7-dev.5f6deeb.0+5f6deeb"
"web3-errors": "1.2.2-dev.60fc197.0+60fc197",
"web3-types": "1.7.1-dev.60fc197.0+60fc197",
"web3-validator": "2.0.7-dev.60fc197.0+60fc197"
},
"gitHead": "5f6deebd2b27a6120e3102f4f03fb82b8c1b4674"
"gitHead": "60fc1979820fa7be3b6052ccca8397ee75032631"
}

@@ -134,2 +134,7 @@ /*

}
if (baseType === 'string') {
return String(value);
}
} catch (error) {

@@ -293,3 +298,3 @@ // If someone didn't use `eth` keyword we can return original value

dataPath.push(key);
const schemaProp = findSchemaByDataPath(schema, dataPath, oneOfPath);
let schemaProp = findSchemaByDataPath(schema, dataPath, oneOfPath);

@@ -327,2 +332,16 @@ // If value is a scaler value

// The following code is basically saying:
// if the schema specifies oneOf, then we are to loop
// over each possible schema and check if they type of the schema specifies format
// and if so we use the oneOfSchemaProp as the schema for formatting
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
if ((schemaProp?.format === undefined) && (schemaProp?.oneOf !== undefined)) {
for (const [_index, oneOfSchemaProp] of schemaProp.oneOf.entries()) {
if ((oneOfSchemaProp?.format !== undefined)) {
schemaProp = oneOfSchemaProp;
break;
}
};
}
object[key] = convertScalarValue(value, schemaProp.format as string, format);

@@ -329,0 +348,0 @@

Sorry, the diff of this file is not supported yet

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