aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-22 23:39:41 +0800
committerFabio Berger <me@fabioberger.com>2018-06-22 23:39:41 +0800
commit59d3a219937a80fa6f8d6096e9a54534103c0cd7 (patch)
tree088e56b0c00bedd01f651838a441ef5af66491cb
parentd2faa49bf4881118c029a5657e081d71b9f584da (diff)
downloaddexon-sol-tools-59d3a219937a80fa6f8d6096e9a54534103c0cd7.tar
dexon-sol-tools-59d3a219937a80fa6f8d6096e9a54534103c0cd7.tar.gz
dexon-sol-tools-59d3a219937a80fa6f8d6096e9a54534103c0cd7.tar.bz2
dexon-sol-tools-59d3a219937a80fa6f8d6096e9a54534103c0cd7.tar.lz
dexon-sol-tools-59d3a219937a80fa6f8d6096e9a54534103c0cd7.tar.xz
dexon-sol-tools-59d3a219937a80fa6f8d6096e9a54534103c0cd7.tar.zst
dexon-sol-tools-59d3a219937a80fa6f8d6096e9a54534103c0cd7.zip
Fix test now that contract reverts with message
-rw-r--r--packages/contracts/src/utils/types.ts1
-rw-r--r--packages/contracts/test/exchange/dispatcher.ts8
2 files changed, 4 insertions, 5 deletions
diff --git a/packages/contracts/src/utils/types.ts b/packages/contracts/src/utils/types.ts
index c1eb72099..43c9109e7 100644
--- a/packages/contracts/src/utils/types.ts
+++ b/packages/contracts/src/utils/types.ts
@@ -185,4 +185,5 @@ export enum ContractLibErrors {
OnlyContractOwner = 'ONLY_CONTRACT_OWNER',
MakerNotWhitelisted = 'MAKER_NOT_WHITELISTED',
TakerNotWhitelisted = 'TAKER_NOT_WHITELISTED',
+ AssetProxyDoesNotExist = 'ASSET_PROXY_DOES_NOT_EXIST',
}
diff --git a/packages/contracts/test/exchange/dispatcher.ts b/packages/contracts/test/exchange/dispatcher.ts
index 299950603..d463f6c35 100644
--- a/packages/contracts/test/exchange/dispatcher.ts
+++ b/packages/contracts/test/exchange/dispatcher.ts
@@ -9,10 +9,7 @@ import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/e_r_c2
import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/e_r_c721_proxy';
import { TestAssetProxyDispatcherContract } from '../../src/generated_contract_wrappers/test_asset_proxy_dispatcher';
import { artifacts } from '../../src/utils/artifacts';
-import {
- expectRevertOrAlwaysFailingTransactionAsync,
- expectRevertReasonOrAlwaysFailingTransactionAsync,
-} from '../../src/utils/assertions';
+import { expectRevertReasonOrAlwaysFailingTransactionAsync } from '../../src/utils/assertions';
import { chaiSetup } from '../../src/utils/chai_setup';
import { constants } from '../../src/utils/constants';
import { ERC20Wrapper } from '../../src/utils/erc20_wrapper';
@@ -314,7 +311,7 @@ describe('AssetProxyDispatcher', () => {
const encodedAssetDataWithoutProxyId = encodedAssetData.slice(0, -2);
// Perform a transfer from makerAddress to takerAddress
const amount = new BigNumber(10);
- return expectRevertOrAlwaysFailingTransactionAsync(
+ return expectRevertReasonOrAlwaysFailingTransactionAsync(
assetProxyDispatcher.publicDispatchTransferFrom.sendTransactionAsync(
encodedAssetDataWithoutProxyId,
AssetProxyId.ERC20,
@@ -323,6 +320,7 @@ describe('AssetProxyDispatcher', () => {
amount,
{ from: owner },
),
+ ContractLibErrors.AssetProxyDoesNotExist,
);
});
});