mirror of https://github.com/status-im/web3.js.git
fixed build issues in formatInputDynamicBytes
This commit is contained in:
parent
0e3b29c7c2
commit
9061116db3
|
@ -354,9 +354,9 @@ var formatInputBytes = function (value) {
|
|||
* @returns {SolidityParam}
|
||||
*/
|
||||
var formatInputDynamicBytes = function (value) {
|
||||
var value = utils.toHex(value);
|
||||
value = utils.toHex(value);
|
||||
var result = utils.padRight((value).substr(2), 64);
|
||||
var length = (value.length / 2 - 1) | 0;
|
||||
var length = (value.length / 2 - 1) || 0;
|
||||
return new SolidityParam(formatInputInt(length).value + result, 32);
|
||||
};
|
||||
|
||||
|
@ -1096,7 +1096,7 @@ var fromDecimal = function (value) {
|
|||
* @return {String}
|
||||
*/
|
||||
var toHex = function (val) {
|
||||
/*jshint maxcomplexity:7 */
|
||||
/*jshint maxcomplexity: 8 */
|
||||
|
||||
if (isBoolean(val))
|
||||
return fromDecimal(+val);
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -354,9 +354,9 @@ var formatInputBytes = function (value) {
|
|||
* @returns {SolidityParam}
|
||||
*/
|
||||
var formatInputDynamicBytes = function (value) {
|
||||
var value = utils.toHex(value);
|
||||
value = utils.toHex(value);
|
||||
var result = utils.padRight((value).substr(2), 64);
|
||||
var length = (value.length / 2 - 1) | 0;
|
||||
var length = (value.length / 2 - 1) || 0;
|
||||
return new SolidityParam(formatInputInt(length).value + result, 32);
|
||||
};
|
||||
|
||||
|
@ -1096,7 +1096,7 @@ var fromDecimal = function (value) {
|
|||
* @return {String}
|
||||
*/
|
||||
var toHex = function (val) {
|
||||
/*jshint maxcomplexity:7 */
|
||||
/*jshint maxcomplexity: 8 */
|
||||
|
||||
if (isBoolean(val))
|
||||
return fromDecimal(+val);
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -62,9 +62,9 @@ var formatInputBytes = function (value) {
|
|||
* @returns {SolidityParam}
|
||||
*/
|
||||
var formatInputDynamicBytes = function (value) {
|
||||
var value = utils.toHex(value);
|
||||
value = utils.toHex(value);
|
||||
var result = utils.padRight((value).substr(2), 64);
|
||||
var length = (value.length / 2 - 1) | 0;
|
||||
var length = (value.length / 2 - 1) || 0;
|
||||
return new SolidityParam(formatInputInt(length).value + result, 32);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue