diff options
Diffstat (limited to 'packages/utils/src/abi_encoder/evm_data_types/int.ts')
-rw-r--r-- | packages/utils/src/abi_encoder/evm_data_types/int.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/utils/src/abi_encoder/evm_data_types/int.ts b/packages/utils/src/abi_encoder/evm_data_types/int.ts index c7e4318eb..02278f666 100644 --- a/packages/utils/src/abi_encoder/evm_data_types/int.ts +++ b/packages/utils/src/abi_encoder/evm_data_types/int.ts @@ -51,7 +51,7 @@ export class IntDataType extends AbstractBlobDataType { public decodeValue(calldata: RawCalldata): BigNumber | number { const valueBuf = calldata.popWord(); const value = EncoderMath.safeDecodeNumericValue(valueBuf, this._minValue, this._maxValue); - if (this._width === constants.NUMBER_OF_BYTES_IN_UINT8) { + if (this._width === constants.NUMBER_OF_BYTES_IN_INT8) { return value.toNumber(); } return value; @@ -59,7 +59,7 @@ export class IntDataType extends AbstractBlobDataType { public getDefaultValue(): BigNumber | number { const defaultValue = IntDataType._DEFAULT_VALUE; - if (this._width === constants.NUMBER_OF_BYTES_IN_UINT8) { + if (this._width === constants.NUMBER_OF_BYTES_IN_INT8) { return defaultValue.toNumber(); } return defaultValue; |