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

@0x/web3-wrapper

Package Overview
Dependencies
Maintainers
5
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0x/web3-wrapper - npm Package Compare versions

Comparing version 3.2.4 to 4.0.0

14

CHANGELOG.json
[
{
"version": "4.0.0",
"changes": [
{
"note": "Upgrade the bignumber.js to v8.0.2",
"pr": 1517
},
{
"note": "Update ganache-core to v2.3.3",
"pr": 1518
}
],
"timestamp": 1549373905
},
{
"timestamp": 1547561734,

@@ -4,0 +18,0 @@ "version": "3.2.4",

@@ -8,2 +8,7 @@ <!--

## v4.0.0 - _February 5, 2019_
* Upgrade the bignumber.js to v8.0.2 (#1517)
* Update ganache-core to v2.3.3 (#1518)
## v3.2.4 - _January 15, 2019_

@@ -10,0 +15,0 @@

1

lib/src/utils.d.ts
import { BigNumber } from '@0x/utils';
export declare const utils: {
isBigNumber(value: any): boolean;
convertHexToNumber(value: string): number;

@@ -5,0 +4,0 @@ convertHexToNumberOrNull(hex: string | null): number | null;

@@ -6,6 +6,2 @@ "use strict";

exports.utils = {
isBigNumber: function (value) {
var isBigNumber = _.isObject(value) && value.isBigNumber;
return isBigNumber;
},
convertHexToNumber: function (value) {

@@ -25,3 +21,3 @@ var valueBigNumber = new utils_1.BigNumber(value);

var num = value || 0;
var isBigNumber = exports.utils.isBigNumber(num);
var isBigNumber = utils_1.BigNumber.isBigNumber(num);
if (isBigNumber) {

@@ -40,3 +36,3 @@ return num;

var valueHex = valueBigNumber.toString(hexBase);
return valueBigNumber.lessThan(0) ? "-0x" + valueHex.substr(1) : "0x" + valueHex;
return valueBigNumber.isLessThan(0) ? "-0x" + valueHex.substr(1) : "0x" + valueHex;
},

@@ -43,0 +39,0 @@ numberToHex: function (value) {

@@ -39,2 +39,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var utils_1 = require("@0x/utils");
var chai = require("chai");

@@ -45,3 +46,2 @@ var ethereum_types_1 = require("ethereum-types");

require("mocha");
var utils_1 = require("../src/utils");
var web3_wrapper_1 = require("../src/web3_wrapper");

@@ -85,3 +85,3 @@ var chai_setup_1 = require("./utils/chai_setup");

nodeVersion = _a.sent();
NODE_VERSION = 'EthereumJS TestRPC/v2.1.2/ethereum-js';
NODE_VERSION = 'EthereumJS TestRPC/v2.3.3/ethereum-js';
expect(nodeVersion).to.be.equal(NODE_VERSION);

@@ -252,3 +252,3 @@ return [2 /*return*/];

expect(blockIfExists.number).to.be.equal(0);
expect(utils_1.utils.isBigNumber(blockIfExists.difficulty)).to.equal(true);
expect(utils_1.BigNumber.isBigNumber(blockIfExists.difficulty)).to.equal(true);
expect(_.isNumber(blockIfExists.gasLimit)).to.equal(true);

@@ -319,3 +319,3 @@ return [2 /*return*/];

expect(block.number).to.be.equal(0);
expect(utils_1.utils.isBigNumber(block.difficulty)).to.equal(true);
expect(utils_1.BigNumber.isBigNumber(block.difficulty)).to.equal(true);
expect(_.isNumber(block.gasLimit)).to.equal(true);

@@ -322,0 +322,0 @@ return [2 /*return*/];

{
"name": "@0x/web3-wrapper",
"version": "3.2.4",
"version": "4.0.0",
"engines": {

@@ -39,10 +39,10 @@ "node": ">=6.12"

"devDependencies": {
"@0x/tslint-config": "^2.0.2",
"@types/ganache-core": "^2.1.0",
"@0x/tslint-config": "^3.0.0",
"@types/ganache-core": "^2.1.2",
"@types/lodash": "4.14.104",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^2.0.1",
"chai-bignumber": "^3.0.0",
"dirty-chai": "^2.0.1",
"ganache-core": "0xProject/ganache-core#monorepo-dep",
"ganache-core": "^2.3.3",
"make-promises-safe": "^1.1.0",

@@ -58,10 +58,10 @@ "mocha": "^4.1.0",

"dependencies": {
"@0x/assert": "^1.0.23",
"@0x/json-schemas": "^2.1.7",
"@0x/typescript-typings": "^3.0.8",
"@0x/utils": "^3.0.1",
"ethereum-types": "^1.1.6",
"@0x/assert": "^2.0.0",
"@0x/json-schemas": "^3.0.0",
"@0x/typescript-typings": "^4.0.0",
"@0x/utils": "^4.0.1",
"ethereum-types": "^2.0.0",
"ethereumjs-util": "^5.1.1",
"ethers": "~4.0.4",
"lodash": "^4.17.5"
"lodash": "^4.17.11"
},

@@ -71,3 +71,3 @@ "publishConfig": {

},
"gitHead": "f570f80674c22f69712c45e8e3c48e948b51f357"
"gitHead": "7b583cecb29c24f561c8befa835ba9ef5a6918f6"
}

@@ -0,1 +1,2 @@

import { BigNumber } from '@0x/utils';
import * as chai from 'chai';

@@ -7,3 +8,2 @@ import { BlockParamLiteral, JSONRPCErrorCallback, JSONRPCRequestPayload, TransactionReceipt } from 'ethereum-types';

import { utils } from '../src/utils';
import { Web3Wrapper } from '../src/web3_wrapper';

@@ -39,3 +39,3 @@

const nodeVersion = await web3Wrapper.getNodeVersionAsync();
const NODE_VERSION = 'EthereumJS TestRPC/v2.1.2/ethereum-js';
const NODE_VERSION = 'EthereumJS TestRPC/v2.3.3/ethereum-js';
expect(nodeVersion).to.be.equal(NODE_VERSION);

@@ -123,3 +123,3 @@ });

expect(blockIfExists.number).to.be.equal(0);
expect(utils.isBigNumber(blockIfExists.difficulty)).to.equal(true);
expect(BigNumber.isBigNumber(blockIfExists.difficulty)).to.equal(true);
expect(_.isNumber(blockIfExists.gasLimit)).to.equal(true);

@@ -157,3 +157,3 @@ });

expect(block.number).to.be.equal(0);
expect(utils.isBigNumber(block.difficulty)).to.equal(true);
expect(BigNumber.isBigNumber(block.difficulty)).to.equal(true);
expect(_.isNumber(block.gasLimit)).to.equal(true);

@@ -160,0 +160,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

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