Removed Circular Dependencies

This commit is contained in:
Nicolas Gotchac
2016-11-26 17:06:37 +01:00
parent 002c793f53
commit 353b6c06db
7 changed files with 26 additions and 18 deletions

View File

@@ -17,7 +17,7 @@
import BigNumber from 'bignumber.js';
import { isArray, isHex, isInstanceOf, isString } from '../util/types';
import { padLeft } from '../util/format';
import { padLeft, toHex } from '../util/format';
export function inAddress (address) {
// TODO: address validation if we have upper-lower addresses
@@ -100,15 +100,7 @@ export function inFilter (options) {
}
export function inHex (str) {
if (str && str.toString) {
str = str.toString(16);
}
if (str && str.substr(0, 2) === '0x') {
return str.toLowerCase();
}
return `0x${(str || '').toLowerCase()}`;
return toHex(str);
}
export function inNumber10 (number) {