diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-05 17:13:55 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-05 17:13:55 +0800 |
commit | 28d019f82417cee3651848d697edb6e2736c407c (patch) | |
tree | eb77a9d6aacd21d467351929dedea2e5098d8395 /packages/fill-scenarios | |
parent | de532bb2fc9f4b5d709145d659f531823d4c0f8a (diff) | |
download | dexon-sol-tools-28d019f82417cee3651848d697edb6e2736c407c.tar dexon-sol-tools-28d019f82417cee3651848d697edb6e2736c407c.tar.gz dexon-sol-tools-28d019f82417cee3651848d697edb6e2736c407c.tar.bz2 dexon-sol-tools-28d019f82417cee3651848d697edb6e2736c407c.tar.lz dexon-sol-tools-28d019f82417cee3651848d697edb6e2736c407c.tar.xz dexon-sol-tools-28d019f82417cee3651848d697edb6e2736c407c.tar.zst dexon-sol-tools-28d019f82417cee3651848d697edb6e2736c407c.zip |
Use _.omit for conciseness
Diffstat (limited to 'packages/fill-scenarios')
-rw-r--r-- | packages/fill-scenarios/src/index.ts | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/packages/fill-scenarios/src/index.ts b/packages/fill-scenarios/src/index.ts index de62694c1..dc877a0fd 100644 --- a/packages/fill-scenarios/src/index.ts +++ b/packages/fill-scenarios/src/index.ts @@ -1,5 +1,5 @@ import { assetProxyUtils, orderFactory } from '@0xproject/order-utils'; -import { SignedOrder, Token } from '@0xproject/types'; +import { OrderWithoutExchangeAddress, SignedOrder, Token } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Provider } from 'ethereum-types'; @@ -144,20 +144,10 @@ export class FillScenarios { this._web3Wrapper.getContractDefaults(), ); - const orderWithoutExchangeAddress = { - senderAddress: signedOrder.senderAddress, - makerAddress: signedOrder.makerAddress, - takerAddress: signedOrder.takerAddress, - feeRecipientAddress: signedOrder.feeRecipientAddress, - makerAssetAmount: signedOrder.makerAssetAmount, - takerAssetAmount: signedOrder.takerAssetAmount, - makerFee: signedOrder.makerFee, - takerFee: signedOrder.takerFee, - expirationTimeSeconds: signedOrder.expirationTimeSeconds, - salt: signedOrder.salt, - makerAssetData: signedOrder.makerAssetData, - takerAssetData: signedOrder.takerAssetData, - }; + const orderWithoutExchangeAddress = _.omit(signedOrder, [ + 'signature', + 'exchangeAddress', + ]) as OrderWithoutExchangeAddress; await exchangeInstance.fillOrder.sendTransactionAsync( orderWithoutExchangeAddress, |