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 52bddf996..b3c3a891c 100644 --- a/packages/contracts/test/exchange/core.ts +++ b/packages/contracts/test/exchange/core.ts @@ -1,6 +1,6 @@ import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { assetProxyUtils, orderHashUtils } from '@0xproject/order-utils'; -import { AssetProxyId, RevertReasons, SignedOrder } from '@0xproject/types'; +import { AssetProxyId, RevertReason, SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as chai from 'chai'; @@ -147,7 +147,7 @@ describe('Exchange core', () => { signedOrder.signature = invalidSigHex; return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.fillOrderAsync(signedOrder, takerAddress), - RevertReasons.InvalidOrderSignature, + RevertReason.InvalidOrderSignature, ); }); @@ -156,7 +156,7 @@ describe('Exchange core', () => { await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress); return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.fillOrderAsync(signedOrder, takerAddress), - RevertReasons.OrderUnfillable, + RevertReason.OrderUnfillable, ); }); }); @@ -170,7 +170,7 @@ describe('Exchange core', () => { it('should throw if not sent by maker', async () => { return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.cancelOrderAsync(signedOrder, takerAddress), - RevertReasons.InvalidMaker, + RevertReason.InvalidMaker, ); }); @@ -181,7 +181,7 @@ describe('Exchange core', () => { return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress), - RevertReasons.OrderUnfillable, + RevertReason.OrderUnfillable, ); }); @@ -192,7 +192,7 @@ describe('Exchange core', () => { return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress), - RevertReasons.OrderUnfillable, + RevertReason.OrderUnfillable, ); }); @@ -202,7 +202,7 @@ describe('Exchange core', () => { exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, { takerAssetFillAmount: signedOrder.takerAssetAmount.div(2), }), - RevertReasons.OrderUnfillable, + RevertReason.OrderUnfillable, ); }); @@ -225,7 +225,7 @@ describe('Exchange core', () => { await exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress); return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress), - RevertReasons.OrderUnfillable, + RevertReason.OrderUnfillable, ); }); @@ -235,7 +235,7 @@ describe('Exchange core', () => { }); return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress), - RevertReasons.OrderUnfillable, + RevertReason.OrderUnfillable, ); }); @@ -255,7 +255,7 @@ describe('Exchange core', () => { exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, { takerAssetFillAmount: fillTakerAssetAmount2, }), - RevertReasons.RoundingError, + RevertReason.RoundingError, ); }); }); @@ -267,7 +267,7 @@ describe('Exchange core', () => { const lesserOrderEpoch = new BigNumber(0); return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.cancelOrdersUpToAsync(lesserOrderEpoch, makerAddress), - RevertReasons.InvalidNewOrderEpoch, + RevertReason.InvalidNewOrderEpoch, ); }); @@ -276,7 +276,7 @@ describe('Exchange core', () => { await exchangeWrapper.cancelOrdersUpToAsync(orderEpoch, makerAddress); return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.cancelOrdersUpToAsync(orderEpoch, makerAddress), - RevertReasons.InvalidNewOrderEpoch, + RevertReason.InvalidNewOrderEpoch, ); }); @@ -410,7 +410,7 @@ describe('Exchange core', () => { const takerAssetFillAmount = signedOrder.takerAssetAmount; return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, { takerAssetFillAmount }), - RevertReasons.InvalidAmount, + RevertReason.TransferFailed, ); }); @@ -433,7 +433,7 @@ describe('Exchange core', () => { const takerAssetFillAmount = signedOrder.takerAssetAmount; return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, { takerAssetFillAmount }), - RevertReasons.InvalidAmount, + RevertReason.TransferFailed, ); }); @@ -450,7 +450,7 @@ describe('Exchange core', () => { const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2); return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, { takerAssetFillAmount }), - RevertReasons.RoundingError, + RevertReason.RoundingError, ); }); }); |