From b0817854e81512ad95cca4d842a671304ae3b94a Mon Sep 17 00:00:00 2001 From: Greg Hysen Date: Fri, 11 Jan 2019 16:13:52 -0800 Subject: strict decoding of return values using generics --- packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts') diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts index 8885069bd..2185c7999 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts @@ -38,8 +38,11 @@ export class IWalletContract extends BaseContract { const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,bytes)'); - const resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult); - return resultArray[0]; + // tslint:disable boolean-naming + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + // tslint:enable boolean-naming + return result; }, }; public static async deployFrom0xArtifactAsync( -- cgit