Skip to content

Commit 78f5a22

Browse files
whymarrhMajorLift
authored andcommitted
Update to ethereumjs-util@6 (#142)
* Update direct dep to ethereumjs-util@6 * Update ethereumjs-util imports where possible
1 parent 5c6dcb4 commit 78f5a22

File tree

11 files changed

+194
-15
lines changed

11 files changed

+194
-15
lines changed

npm-shrinkwrap.json

Lines changed: 182 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"eth-phishing-detect": "^1.1.13",
8282
"eth-query": "^2.1.2",
8383
"eth-sig-util": "^2.1.0",
84-
"ethereumjs-util": "^5.2.0",
84+
"ethereumjs-util": "^6.1.0",
8585
"ethereumjs-wallet": "0.6.0",
8686
"ethjs-query": "^0.3.8",
8787
"human-standard-collectible-abi": "^1.0.2",

src/assets/AssetsController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'isomorphic-fetch';
2+
import { toChecksumAddress } from 'ethereumjs-util';
23
import BaseController, { BaseConfig, BaseState } from '../BaseController';
34
import PreferencesController from '../user/PreferencesController';
45
import NetworkController, { NetworkType } from '../network/NetworkController';
@@ -8,7 +9,6 @@ import { safelyExecute, handleFetch, validateTokenToWatch } from '../util';
89
import { EventEmitter } from 'events';
910
import { ApiCollectibleResponse } from './AssetsDetectionController';
1011

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

src/assets/AssetsDetectionController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'isomorphic-fetch';
2+
import { toChecksumAddress } from 'ethereumjs-util';
23
import BaseController, { BaseConfig, BaseState } from '../BaseController';
34
import AssetsController from './AssetsController';
45
import NetworkController from '../network/NetworkController';
@@ -9,7 +10,6 @@ import { Token } from './TokenRatesController';
910
import { NetworkType } from '../network/NetworkController';
1011

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

src/assets/TokenRatesController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import 'isomorphic-fetch';
2+
import { toChecksumAddress } from 'ethereumjs-util';
23
import BaseController, { BaseConfig, BaseState } from '../BaseController';
34
import AssetsController from './AssetsController';
45
import { safelyExecute } from '../util';
56
import CurrencyRateController from './CurrencyRateController';
6-
const { toChecksumAddress } = require('ethereumjs-util');
77

88
/**
99
* @type CoinGeckoResponse

src/keyring/KeyringController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import 'isomorphic-fetch';
2+
import { toChecksumAddress } from 'ethereumjs-util';
23
import BaseController, { BaseConfig, BaseState, Listener } from '../BaseController';
34
import PreferencesController from '../user/PreferencesController';
45
import { Transaction } from '../transaction/TransactionController';
56
import { PersonalMessageParams } from '../message-manager/PersonalMessageManager';
67
import { TypedMessageParams } from '../message-manager/TypedMessageManager';
78
const sigUtil = require('eth-sig-util');
8-
const { toChecksumAddress } = require('ethereumjs-util');
99
const Keyring = require('eth-keyring-controller');
1010
const Mutex = require('await-semaphore').Mutex;
1111
const Wallet = require('ethereumjs-wallet');

src/transaction/TransactionController.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { EventEmitter } from 'events';
2+
import { addHexPrefix, bufferToHex } from 'ethereumjs-util';
23
import BaseController, { BaseConfig, BaseState } from '../BaseController';
34
import NetworkController from '../network/NetworkController';
45
import {
@@ -14,7 +15,7 @@ const MethodRegistry = require('eth-method-registry');
1415
const EthQuery = require('eth-query');
1516
const Transaction = require('ethereumjs-tx');
1617
const random = require('uuid/v1');
17-
const { addHexPrefix, bufferToHex, BN } = require('ethereumjs-util');
18+
const { BN } = require('ethereumjs-util');
1819
const Mutex = require('await-semaphore').Mutex;
1920

2021
/**

src/user/AddressBookController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { isValidAddress, toChecksumAddress } = require('ethereumjs-util');
1+
import { isValidAddress, toChecksumAddress } from 'ethereumjs-util';
22
import BaseController, { BaseConfig, BaseState } from '../BaseController';
33

44
/**

src/user/PreferencesController.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
import { toChecksumAddress } from 'ethereumjs-util';
12
import BaseController, { BaseConfig, BaseState } from '../BaseController';
23
import { ContactEntry } from './AddressBookController';
34

4-
const { toChecksumAddress } = require('ethereumjs-util');
5-
65
/**
76
* Custom RPC network information
87
*

src/util.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
import { addHexPrefix, isValidAddress, bufferToHex } from 'ethereumjs-util';
12
import { Transaction } from './transaction/TransactionController';
23
import { PersonalMessageParams } from './message-manager/PersonalMessageManager';
34
import { TypedMessageParams } from './message-manager/TypedMessageManager';
45
import { Token } from './assets/TokenRatesController';
56

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

1112
const NORMALIZERS: { [param in keyof Transaction]: any } = {

0 commit comments

Comments
 (0)