Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to ethereumjs-util@6 #142

Merged
merged 4 commits into from
Aug 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
186 changes: 182 additions & 4 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"eth-phishing-detect": "^1.1.13",
"eth-query": "^2.1.2",
"eth-sig-util": "^2.1.0",
"ethereumjs-util": "^5.2.0",
"ethereumjs-util": "^6.1.0",
"ethereumjs-wallet": "0.6.0",
"ethjs-query": "^0.3.8",
"human-standard-collectible-abi": "^1.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/AssetsController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'isomorphic-fetch';
import { toChecksumAddress } from 'ethereumjs-util';
import BaseController, { BaseConfig, BaseState } from '../BaseController';
import PreferencesController from '../user/PreferencesController';
import NetworkController, { NetworkType } from '../network/NetworkController';
Expand All @@ -8,7 +9,6 @@ import { safelyExecute, handleFetch, validateTokenToWatch } from '../util';
import { EventEmitter } from 'events';
import { ApiCollectibleResponse } from './AssetsDetectionController';

const { toChecksumAddress } = require('ethereumjs-util');
const Mutex = require('await-semaphore').Mutex;
const random = require('uuid/v1');

Expand Down
2 changes: 1 addition & 1 deletion src/assets/AssetsDetectionController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'isomorphic-fetch';
import { toChecksumAddress } from 'ethereumjs-util';
import BaseController, { BaseConfig, BaseState } from '../BaseController';
import AssetsController from './AssetsController';
import NetworkController from '../network/NetworkController';
Expand All @@ -9,7 +10,6 @@ import { Token } from './TokenRatesController';
import { NetworkType } from '../network/NetworkController';

const contractMap = require('eth-contract-metadata');
const { toChecksumAddress } = require('ethereumjs-util');
const DEFAULT_INTERVAL = 180000;
const MAINNET = 'mainnet';

Expand Down
2 changes: 1 addition & 1 deletion src/assets/TokenRatesController.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'isomorphic-fetch';
import { toChecksumAddress } from 'ethereumjs-util';
import BaseController, { BaseConfig, BaseState } from '../BaseController';
import AssetsController from './AssetsController';
import { safelyExecute } from '../util';
import CurrencyRateController from './CurrencyRateController';
const { toChecksumAddress } = require('ethereumjs-util');

/**
* @type CoinGeckoResponse
Expand Down
2 changes: 1 addition & 1 deletion src/keyring/KeyringController.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import 'isomorphic-fetch';
import { toChecksumAddress } from 'ethereumjs-util';
import BaseController, { BaseConfig, BaseState, Listener } from '../BaseController';
import PreferencesController from '../user/PreferencesController';
import { Transaction } from '../transaction/TransactionController';
import { PersonalMessageParams } from '../message-manager/PersonalMessageManager';
import { TypedMessageParams } from '../message-manager/TypedMessageManager';
const sigUtil = require('eth-sig-util');
const { toChecksumAddress } = require('ethereumjs-util');
const Keyring = require('eth-keyring-controller');
const Mutex = require('await-semaphore').Mutex;
const Wallet = require('ethereumjs-wallet');
Expand Down
3 changes: 2 additions & 1 deletion src/transaction/TransactionController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { EventEmitter } from 'events';
import { addHexPrefix, bufferToHex } from 'ethereumjs-util';
import BaseController, { BaseConfig, BaseState } from '../BaseController';
import NetworkController from '../network/NetworkController';
import {
Expand All @@ -14,7 +15,7 @@ const MethodRegistry = require('eth-method-registry');
const EthQuery = require('eth-query');
const Transaction = require('ethereumjs-tx');
const random = require('uuid/v1');
const { addHexPrefix, bufferToHex, BN } = require('ethereumjs-util');
const { BN } = require('ethereumjs-util');
const Mutex = require('await-semaphore').Mutex;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/user/AddressBookController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { isValidAddress, toChecksumAddress } = require('ethereumjs-util');
import { isValidAddress, toChecksumAddress } from 'ethereumjs-util';
import BaseController, { BaseConfig, BaseState } from '../BaseController';

/**
Expand Down
3 changes: 1 addition & 2 deletions src/user/PreferencesController.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { toChecksumAddress } from 'ethereumjs-util';
import BaseController, { BaseConfig, BaseState } from '../BaseController';
import { ContactEntry } from './AddressBookController';

const { toChecksumAddress } = require('ethereumjs-util');

/**
* Custom RPC network information
*
Expand Down
3 changes: 2 additions & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { addHexPrefix, isValidAddress, bufferToHex } from 'ethereumjs-util';
import { Transaction } from './transaction/TransactionController';
import { PersonalMessageParams } from './message-manager/PersonalMessageManager';
import { TypedMessageParams } from './message-manager/TypedMessageManager';
import { Token } from './assets/TokenRatesController';

const sigUtil = require('eth-sig-util');
const jsonschema = require('jsonschema');
const { addHexPrefix, BN, isValidAddress, stripHexPrefix, bufferToHex } = require('ethereumjs-util');
const { BN, stripHexPrefix } = require('ethereumjs-util');
const hexRe = /^[0-9A-Fa-f]+$/g;

const NORMALIZERS: { [param in keyof Transaction]: any } = {
Expand Down
2 changes: 1 addition & 1 deletion tests/KeyringController.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as ethUtil from 'ethereumjs-util';
import KeyringController, { Keyring } from '../src/keyring/KeyringController';
import PreferencesController from '../src/user/PreferencesController';
import ComposableController from '../src/ComposableController';
import { KeyringConfig } from '../src/keyring/KeyringController';
import { stub } from 'sinon';
const ethUtil = require('ethereumjs-util');
const mockEncryptor: any = require('../node_modules/eth-keyring-controller/test/lib/mock-encryptor.js');
const Transaction = require('ethereumjs-tx');

Expand Down