address comments
This commit is contained in:
parent
ffac52f42e
commit
b45ec47eee
@ -40,8 +40,8 @@ export class FillOrderWrapper {
|
||||
txReceipt: TransactionReceiptWithDecodedLogs,
|
||||
signedOrder: SignedOrder,
|
||||
takerAddress: string,
|
||||
opts: { takerAssetFillAmount?: BigNumber } = {},
|
||||
initBalanceStore: BalanceStore,
|
||||
opts: { takerAssetFillAmount?: BigNumber } = {},
|
||||
): [FillResults, FillEventArgs, BalanceStore] {
|
||||
const balanceStore = LocalBalanceStore.create(initBalanceStore);
|
||||
const takerAssetFillAmount =
|
||||
@ -168,7 +168,7 @@ export class FillOrderWrapper {
|
||||
simulatedFillResults,
|
||||
simulatedFillEvent,
|
||||
simulatedFinalBalanceStore,
|
||||
] = FillOrderWrapper.simulateFillOrder(txReceipt, signedOrder, from, opts, this._blockchainBalanceStore);
|
||||
] = FillOrderWrapper.simulateFillOrder(txReceipt, signedOrder, from, this._blockchainBalanceStore, opts);
|
||||
// Assert state transition
|
||||
expect(simulatedFillResults, 'Fill Results').to.be.deep.equal(fillResults);
|
||||
expect(simulatedFillEvent, 'Fill Events').to.be.deep.equal(fillEvent);
|
||||
|
@ -222,23 +222,26 @@ blockchainTests.resets('Exchange core', () => {
|
||||
};
|
||||
const privateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(makerAddress)];
|
||||
orderFactory = new OrderFactory(privateKey, defaultOrderParams);
|
||||
|
||||
const tokenContracts = {
|
||||
erc20: { erc20TokenA, erc20TokenB, feeToken, noReturnErc20Token },
|
||||
erc721: { erc721Token },
|
||||
erc1155: { erc1155Contract },
|
||||
};
|
||||
const tokenIds = {
|
||||
erc721: { [erc721Token.address]: [...erc721MakerAssetIds, ...erc721TakerAssetIds] },
|
||||
erc1155: {
|
||||
[erc1155Contract.address]: {
|
||||
fungible: erc1155FungibleTokens,
|
||||
nonFungible: [...erc1155NonFungibleTokensOwnedByMaker, ...erc1155NonFungibleTokensOwnedByTaker],
|
||||
},
|
||||
},
|
||||
};
|
||||
fillOrderWrapper = new FillOrderWrapper(
|
||||
exchange,
|
||||
{ makerAddress, takerAddress, feeRecipientAddress },
|
||||
{
|
||||
erc20: { erc20TokenA, erc20TokenB, feeToken, noReturnErc20Token },
|
||||
erc721: { erc721Token },
|
||||
erc1155: { erc1155Contract },
|
||||
},
|
||||
{
|
||||
erc721: { [erc721Token.address]: [...erc721MakerAssetIds, ...erc721TakerAssetIds] },
|
||||
erc1155: {
|
||||
[erc1155Contract.address]: {
|
||||
fungible: erc1155FungibleTokens,
|
||||
nonFungible: [...erc1155NonFungibleTokensOwnedByMaker, ...erc1155NonFungibleTokensOwnedByTaker],
|
||||
},
|
||||
},
|
||||
},
|
||||
tokenContracts,
|
||||
tokenIds,
|
||||
);
|
||||
});
|
||||
describe('fillOrder', () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user