diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2019-01-10 02:43:36 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2019-01-15 02:49:44 +0800 |
commit | 892be49b98acae61d1892ea89ef3c0b42168d8eb (patch) | |
tree | 60f28ef77f28ff1d9809d2d182b26ac17133b12b /contracts/protocol | |
parent | 1cbc03ae43aae5f754d7752e8cafb303781fa033 (diff) | |
download | dexon-sol-tools-892be49b98acae61d1892ea89ef3c0b42168d8eb.tar dexon-sol-tools-892be49b98acae61d1892ea89ef3c0b42168d8eb.tar.gz dexon-sol-tools-892be49b98acae61d1892ea89ef3c0b42168d8eb.tar.bz2 dexon-sol-tools-892be49b98acae61d1892ea89ef3c0b42168d8eb.tar.lz dexon-sol-tools-892be49b98acae61d1892ea89ef3c0b42168d8eb.tar.xz dexon-sol-tools-892be49b98acae61d1892ea89ef3c0b42168d8eb.tar.zst dexon-sol-tools-892be49b98acae61d1892ea89ef3c0b42168d8eb.zip |
Use simpler `_.find` to locate fillOrderBai
Diffstat (limited to 'contracts/protocol')
-rw-r--r-- | contracts/protocol/test/utils/exchange_wrapper.ts | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/contracts/protocol/test/utils/exchange_wrapper.ts b/contracts/protocol/test/utils/exchange_wrapper.ts index 7eca809e6..871db3529 100644 --- a/contracts/protocol/test/utils/exchange_wrapper.ts +++ b/contracts/protocol/test/utils/exchange_wrapper.ts @@ -280,12 +280,7 @@ export class ExchangeWrapper { } public abiDecodeFillOrder(data: string): AbiDecodedFillOrderData { // Lookup fillOrder ABI in exchange abi - const fillOrderAbi = _.find(this._exchange.abi, (value: AbiDefinition) => { - if (value.type === 'function' && (value as any).name === 'fillOrder') { - return true; - } - return false; - }) as MethodAbi; + const fillOrderAbi = _.find(this._exchange.abi, { name: 'fillOrder' }) as MethodAbi; // Decode input data const abiEncoder = new AbiEncoder.Method(fillOrderAbi); const decodedData = abiEncoder.decode(data) as AbiDecodedFillOrderData; |