diff options
Diffstat (limited to 'packages/contracts/test/exchange/core.ts')
-rw-r--r-- | packages/contracts/test/exchange/core.ts | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts index 6c190d4da..e9c51ea18 100644 --- a/packages/contracts/test/exchange/core.ts +++ b/packages/contracts/test/exchange/core.ts @@ -12,7 +12,7 @@ import { ERC721ProxyContract } from '../../src/contract_wrappers/generated/e_r_c import { CancelContractEventArgs, ExchangeContract, - ExchangeErrorContractEventArgs, + ExchangeStatusContractEventArgs, FillContractEventArgs, } from '../../src/contract_wrappers/generated/exchange'; import { artifacts } from '../../src/utils/artifacts'; @@ -25,8 +25,8 @@ import { ERC721Wrapper } from '../../src/utils/erc721_wrapper'; import { ExchangeWrapper } from '../../src/utils/exchange_wrapper'; import { OrderFactory } from '../../src/utils/order_factory'; import { orderUtils } from '../../src/utils/order_utils'; -import { AssetProxyId, ERC20BalancesByOwner, ExchangeContractErrs, SignedOrder } from '../../src/utils/types'; -import { provider, txDefaults, web3Wrapper } from '../../src/utils/web3_wrapper'; +import { AssetProxyId, ContractName, ERC20BalancesByOwner, ExchangeStatus, SignedOrder } from '../../src/utils/types'; +import { provider, txDefaults, web3Wrapper } from '../utils/web3_wrapper'; chaiSetup.configure(); const expect = chai.expect; @@ -556,9 +556,9 @@ describe('Exchange core', () => { const res = await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress); expect(res.logs).to.have.length(1); - const log = res.logs[0] as LogWithDecodedArgs<ExchangeErrorContractEventArgs>; - const errCode = log.args.errorId; - expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_EXPIRED); + const log = res.logs[0] as LogWithDecodedArgs<ExchangeStatusContractEventArgs>; + const statusCode = log.args.statusId; + expect(statusCode).to.be.equal(ExchangeStatus.ORDER_EXPIRED); }); it('should log an error event if no value is filled', async () => { @@ -567,9 +567,9 @@ describe('Exchange core', () => { const res = await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress); expect(res.logs).to.have.length(1); - const log = res.logs[0] as LogWithDecodedArgs<ExchangeErrorContractEventArgs>; - const errCode = log.args.errorId; - expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_FULLY_FILLED); + const log = res.logs[0] as LogWithDecodedArgs<ExchangeStatusContractEventArgs>; + const statusCode = log.args.statusId; + expect(statusCode).to.be.equal(ExchangeStatus.ORDER_FULLY_FILLED); }); }); @@ -635,9 +635,9 @@ describe('Exchange core', () => { const res = await exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress); expect(res.logs).to.have.length(1); - const log = res.logs[0] as LogWithDecodedArgs<ExchangeErrorContractEventArgs>; - const errCode = log.args.errorId; - expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_CANCELLED); + const log = res.logs[0] as LogWithDecodedArgs<ExchangeStatusContractEventArgs>; + const statusCode = log.args.statusId; + expect(statusCode).to.be.equal(ExchangeStatus.ORDER_CANCELLED); }); it('should log error if order is expired', async () => { @@ -647,9 +647,9 @@ describe('Exchange core', () => { const res = await exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress); expect(res.logs).to.have.length(1); - const log = res.logs[0] as LogWithDecodedArgs<ExchangeErrorContractEventArgs>; - const errCode = log.args.errorId; - expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_EXPIRED); + const log = res.logs[0] as LogWithDecodedArgs<ExchangeStatusContractEventArgs>; + const statusCode = log.args.statusId; + expect(statusCode).to.be.equal(ExchangeStatus.ORDER_EXPIRED); }); }); |