From d304c062eb429d144c0f961864d185cde85a27e5 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 15 Jan 2019 13:22:06 +0100 Subject: Convert address strings to lower case before parsing them as BigNumbers --- packages/utils/src/abi_decoder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/utils') diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts index 2da46db35..28b6418d8 100644 --- a/packages/utils/src/abi_decoder.ts +++ b/packages/utils/src/abi_decoder.ts @@ -69,7 +69,7 @@ export class AbiDecoder { } if (param.type === SolidityTypes.Address) { const baseHex = 16; - value = addressUtils.padZeros(new BigNumber(value).toString(baseHex)); + value = addressUtils.padZeros(new BigNumber((value as string).toLowerCase()).toString(baseHex)); } else if (param.type === SolidityTypes.Uint256 || param.type === SolidityTypes.Uint) { value = new BigNumber(value); } else if (param.type === SolidityTypes.Uint8) { -- cgit