@metamask/eth-sig-util
Advanced tools
Comparing version 7.0.0 to 7.0.1
@@ -170,3 +170,3 @@ "use strict"; | ||
} | ||
else if ((0, utils_2.isStrictHexString)(value)) { | ||
else if ((0, utils_2.isStrictHexString)(value) || value === '0x') { | ||
value = (0, utils_2.hexToBytes)(value); | ||
@@ -173,0 +173,0 @@ } |
@@ -6,3 +6,2 @@ "use strict"; | ||
const utils_1 = require("@metamask/utils"); | ||
const ethjs_util_1 = require("ethjs-util"); | ||
/** | ||
@@ -49,3 +48,3 @@ * Pads the front of the given hex string with zeroes until it reaches the | ||
function legacyToBuffer(value) { | ||
return typeof value === 'string' && !(0, ethjs_util_1.isHexString)(value) | ||
return typeof value === 'string' && !(0, util_1.isHexString)(value) | ||
? Buffer.from(value) | ||
@@ -69,3 +68,3 @@ : (0, util_1.toBuffer)(value); | ||
const sStr = padWithZeroes((0, util_1.toUnsigned)(sSig).toString('hex'), 64); | ||
const vStr = (0, ethjs_util_1.stripHexPrefix)((0, ethjs_util_1.intToHex)(vSig)); | ||
const vStr = (0, utils_1.remove0x)((0, utils_1.numberToHex)(vSig)); | ||
return (0, utils_1.add0x)(rStr.concat(sStr, vStr)); | ||
@@ -72,0 +71,0 @@ } |
{ | ||
"name": "@metamask/eth-sig-util", | ||
"version": "7.0.0", | ||
"version": "7.0.1", | ||
"description": "A few useful functions for signing ethereum data", | ||
@@ -29,6 +29,6 @@ "keywords": [ | ||
"!__snapshots__", | ||
"!*.test.js", | ||
"!*.test.js.map", | ||
"!*.test.ts", | ||
"!*.test.d.ts" | ||
"!**/*.test.js", | ||
"!**/*.test.js.map", | ||
"!**/*.test.ts", | ||
"!**/*.test.d.ts" | ||
], | ||
@@ -52,3 +52,2 @@ "scripts": { | ||
"ethereum-cryptography": "^2.1.2", | ||
"ethjs-util": "^0.1.6", | ||
"tweetnacl": "^1.0.3", | ||
@@ -55,0 +54,0 @@ "tweetnacl-util": "^0.15.1" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
6
0
134115
1472
- Removedethjs-util@^0.1.6
- Removedethjs-util@0.1.6(transitive)
- Removedis-hex-prefixed@1.0.0(transitive)
- Removedstrip-hex-prefix@1.0.0(transitive)