refactor(@embark/utils): move toChecksumAddress to embark-utils

This commit is contained in:
Pascal Precht 2019-05-02 11:10:10 +02:00 committed by Pascal Precht
parent c30f742c38
commit a69f619cf7
3 changed files with 7 additions and 7 deletions

View File

@ -15,7 +15,8 @@ import {
decodeParams,
sha3,
isHex,
soliditySha3
soliditySha3,
toChecksumAddress
} from './web3Utils';
import { getAddressToContract, getTransactionParams } from './transactionUtils';
import LongRunningProcessTimer from './longRunningProcessTimer';
@ -216,6 +217,7 @@ const Utils = {
LogHandler: require('./logHandler'),
LongRunningProcessTimer,
proposeAlternative,
toChecksumAddress,
toposort,
AddressUtils,
AccountParser

View File

@ -51,3 +51,7 @@ export function isHex(hex: string) {
export function soliditySha3(arg: any) {
return web3.utils.soliditySha3(arg);
}
export function toChecksumAddress(address: any) {
return web3.utils.toChecksumAddress(address);
}

View File

@ -287,11 +287,6 @@ function isValidDomain(v) {
return isValid;
}
function toChecksumAddress(address) {
const Web3 = require('web3');
return Web3.utils.toChecksumAddress(address);
}
/**
* Builds a URL
*
@ -445,7 +440,6 @@ module.exports = {
extractTar,
extractZip,
getExternalContractUrl,
toChecksumAddress,
normalizeInput,
buildUrl,
buildUrlFromConfig,