@0x/contracts-exchange
: Light refactoring in
`isolated_fill_order.ts` and `isolated_exchange_wrapper.ts`.
This commit is contained in:
@@ -46,14 +46,18 @@ blockchainTests('Isolated fillOrder() tests', env => {
|
||||
|
||||
before(async () => {
|
||||
[takerAddress, notTakerAddress] = await env.getAccountAddressesAsync();
|
||||
exchange = await IsolatedExchangeWrapper.deployAsync(
|
||||
env.web3Wrapper,
|
||||
_.assign(env.txDefaults, { from: takerAddress }),
|
||||
);
|
||||
exchange = await IsolatedExchangeWrapper.deployAsync(env.web3Wrapper, {
|
||||
...env.txDefaults,
|
||||
from: takerAddress,
|
||||
});
|
||||
});
|
||||
|
||||
function createOrder(details: Partial<Order> = {}): Order {
|
||||
return _.assign({}, DEFAULT_ORDER, { salt: new BigNumber(nextSaltValue++) }, details);
|
||||
return {
|
||||
...DEFAULT_ORDER,
|
||||
salt: new BigNumber(nextSaltValue++),
|
||||
...details,
|
||||
};
|
||||
}
|
||||
|
||||
interface FillOrderAndAssertResultsResults {
|
||||
|
@@ -11,7 +11,6 @@ import { BigNumber } from '@0x/utils';
|
||||
import { TxData, Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as crypto from 'crypto';
|
||||
import { LogEntry } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import {
|
||||
artifacts,
|
||||
@@ -105,7 +104,7 @@ export class IsolatedExchangeWrapper {
|
||||
verifyingContractAddress: this.instance.address,
|
||||
chainId: IsolatedExchangeWrapper.CHAIN_ID,
|
||||
};
|
||||
return orderHashUtils.getOrderHashHex(_.assign(order, { domain }));
|
||||
return orderHashUtils.getOrderHashHex({ ...order, domain });
|
||||
}
|
||||
|
||||
public async getOrderInfoAsync(order: Order): Promise<OrderInfo> {
|
||||
|
Reference in New Issue
Block a user