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