toAscii && fromAscii moved to utils
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user