diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-31 20:54:39 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-31 20:54:39 +0800 |
commit | 4bdf52fc1e5030d53a8b7337051e12ebd0509009 (patch) | |
tree | 68a2e7415e035fe946b229bc78ac405f4a4d8710 /lib/formatters.js | |
parent | 0b82a05a75a0a7592e4fe391120f90d7cee495ac (diff) | |
download | dexon-4bdf52fc1e5030d53a8b7337051e12ebd0509009.tar dexon-4bdf52fc1e5030d53a8b7337051e12ebd0509009.tar.gz dexon-4bdf52fc1e5030d53a8b7337051e12ebd0509009.tar.bz2 dexon-4bdf52fc1e5030d53a8b7337051e12ebd0509009.tar.lz dexon-4bdf52fc1e5030d53a8b7337051e12ebd0509009.tar.xz dexon-4bdf52fc1e5030d53a8b7337051e12ebd0509009.tar.zst dexon-4bdf52fc1e5030d53a8b7337051e12ebd0509009.zip |
toAscii && fromAscii moved to utils
Diffstat (limited to 'lib/formatters.js')
-rw-r--r-- | lib/formatters.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/formatters.js b/lib/formatters.js index ea7ddca26..d8781e21e 100644 --- a/lib/formatters.js +++ b/lib/formatters.js @@ -24,8 +24,7 @@ if (process.env.NODE_ENV !== 'build') { var BigNumber = require('bignumber.js'); // jshint ignore:line } -// TODO: remove web3 dependency from here! -var web3 = require('./web3'); +var utils = require('./utils'); BigNumber.config({ ROUNDING_MODE: BigNumber.ROUND_DOWN }); @@ -66,7 +65,7 @@ var formatInputInt = function (value) { /// Formats input value to byte representation of string /// @returns left-algined byte representation of string var formatInputString = function (value) { - return web3.fromAscii(value, ETH_PADDING).substr(2); + return utils.fromAscii(value, ETH_PADDING).substr(2); }; /// Formats input value to byte representation of bool @@ -131,7 +130,7 @@ var formatOutputBool = function (value) { /// @returns left-aligned input bytes formatted to ascii string var formatOutputString = function (value) { - return web3.toAscii(value); + return utils.toAscii(value); }; /// @returns right-aligned input bytes formatted to address |