Fix a bug when we didn't call isNaN function and assumed it's a property
This commit is contained in:
parent
2cca2d70d7
commit
a3cb722469
@ -69,7 +69,7 @@ export class AbiDecoder {
|
||||
}
|
||||
if (param.type === SolidityTypes.Address) {
|
||||
const baseHex = 16;
|
||||
value = addressUtils.padZeros(new BigNumber((value as string).toLowerCase()).toString(baseHex));
|
||||
value = addressUtils.padZeros(new BigNumber(value).toString(baseHex));
|
||||
} else if (param.type === SolidityTypes.Uint256 || param.type === SolidityTypes.Uint) {
|
||||
value = new BigNumber(value);
|
||||
} else if (param.type === SolidityTypes.Uint8) {
|
||||
|
@ -14,7 +14,7 @@ function sanityCheckBigNumberRange(
|
||||
throw new Error(`Tried to assign value of ${value}, which exceeds max value of ${maxValue}`);
|
||||
} else if (value.isLessThan(minValue)) {
|
||||
throw new Error(`Tried to assign value of ${value}, which exceeds min value of ${minValue}`);
|
||||
} else if (value.isNaN) {
|
||||
} else if (value.isNaN()) {
|
||||
throw new Error(`Tried to assign NaN value`);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user