aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-05 17:13:55 +0800
committerFabio Berger <me@fabioberger.com>2018-06-05 17:13:55 +0800
commit28d019f82417cee3651848d697edb6e2736c407c (patch)
treeeb77a9d6aacd21d467351929dedea2e5098d8395
parentde532bb2fc9f4b5d709145d659f531823d4c0f8a (diff)
downloaddexon-0x-contracts-28d019f82417cee3651848d697edb6e2736c407c.tar.gz
dexon-0x-contracts-28d019f82417cee3651848d697edb6e2736c407c.tar.zst
dexon-0x-contracts-28d019f82417cee3651848d697edb6e2736c407c.zip
Use _.omit for conciseness
-rw-r--r--packages/fill-scenarios/src/index.ts20
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,