diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-12-19 14:01:48 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2019-01-15 02:49:44 +0800 |
commit | e4551c8f6037302124cae4cda51b8f7624ade687 (patch) | |
tree | 7878caf2441e72bd5e8147db44bc0d3426407e34 /packages/utils | |
parent | 2f1454e90e5fd7d85c4deb3a8c674043e8a14564 (diff) | |
download | dexon-0x-contracts-e4551c8f6037302124cae4cda51b8f7624ade687.tar.gz dexon-0x-contracts-e4551c8f6037302124cae4cda51b8f7624ade687.tar.zst dexon-0x-contracts-e4551c8f6037302124cae4cda51b8f7624ade687.zip |
Works for almost all tests
Diffstat (limited to 'packages/utils')
-rw-r--r-- | packages/utils/src/abi_encoder/evm_data_types/method.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/utils/src/abi_encoder/evm_data_types/method.ts b/packages/utils/src/abi_encoder/evm_data_types/method.ts index c777902e8..bae0fdb5d 100644 --- a/packages/utils/src/abi_encoder/evm_data_types/method.ts +++ b/packages/utils/src/abi_encoder/evm_data_types/method.ts @@ -51,6 +51,12 @@ export class MethodDataType extends AbstractSetDataType { return returnValuesAsArray; } + public decodeReturnValuesAsArrayOrNull(returndata: string, rules?: DecodingRules): any { + const returnValuesAsArray = this.decodeReturnValuesAsArray(returndata, rules); + const returnValue = _.isEmpty(returnValuesAsArray) ? [] : returnValuesAsArray; + return returnValue; + } + public getSignature(): string { return this._methodSignature; } |