aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/asset_proxy/proxies.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-27 00:53:44 +0800
committerFabio Berger <me@fabioberger.com>2018-06-27 00:53:44 +0800
commit43ae868c6945045e0c467977e1b3db143e99fc8c (patch)
tree048bd493a3ae76469fabcf7aa5ec1fffe6cdb3b3 /packages/contracts/test/asset_proxy/proxies.ts
parent6dc852774e23aa38c66188100c31ba42667620e8 (diff)
parent1bc742aed1e7f10b79b5ef23ebb57b6c93d64e3c (diff)
downloaddexon-0x-contracts-43ae868c6945045e0c467977e1b3db143e99fc8c.tar.gz
dexon-0x-contracts-43ae868c6945045e0c467977e1b3db143e99fc8c.tar.zst
dexon-0x-contracts-43ae868c6945045e0c467977e1b3db143e99fc8c.zip
Merge branch 'refactor/check-revert-reasons' into feature/combinatorial-testing
* refactor/check-revert-reasons: Temporarily switch revert reasons to `TransferFailed`. Should be `InvalidAmount` but because of an oversight in the assembly implementation of `dispatchTransferFrom`, it always throws `TransferFailed` Expect RevertReason be passed in, not string Rename RevertReasons to RevertReason since singular enum names are more common # Conflicts: # packages/contracts/test/asset_proxy/proxies.ts # packages/contracts/test/exchange/core.ts
Diffstat (limited to 'packages/contracts/test/asset_proxy/proxies.ts')
-rw-r--r--packages/contracts/test/asset_proxy/proxies.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/packages/contracts/test/asset_proxy/proxies.ts b/packages/contracts/test/asset_proxy/proxies.ts
index 7e8e69f4e..5f4c5b597 100644
--- a/packages/contracts/test/asset_proxy/proxies.ts
+++ b/packages/contracts/test/asset_proxy/proxies.ts
@@ -1,6 +1,6 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils';
import { assetProxyUtils, generatePseudoRandomSalt } from '@0xproject/order-utils';
-import { RevertReasons } from '@0xproject/types';
+import { RevertReason } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
import { LogWithDecodedArgs } from 'ethereum-types';
@@ -173,7 +173,7 @@ describe('Asset Transfer Proxies', () => {
transferAmount,
{ from: exchangeAddress },
),
- RevertReasons.TransferFailed,
+ RevertReason.TransferFailed,
);
});
@@ -187,7 +187,7 @@ describe('Asset Transfer Proxies', () => {
erc20Proxy.transferFrom.sendTransactionAsync(encodedAssetData, makerAddress, takerAddress, amount, {
from: notAuthorized,
}),
- RevertReasons.SenderNotAuthorized,
+ RevertReason.SenderNotAuthorized,
);
});
});
@@ -239,7 +239,7 @@ describe('Asset Transfer Proxies', () => {
erc20Proxy.batchTransferFrom.sendTransactionAsync(assetData, fromAddresses, toAddresses, amounts, {
from: notAuthorized,
}),
- RevertReasons.SenderNotAuthorized,
+ RevertReason.SenderNotAuthorized,
);
});
});
@@ -381,7 +381,7 @@ describe('Asset Transfer Proxies', () => {
amount,
{ from: exchangeAddress },
),
- RevertReasons.InvalidAmount,
+ RevertReason.InvalidAmount,
);
});
@@ -401,7 +401,7 @@ describe('Asset Transfer Proxies', () => {
amount,
{ from: exchangeAddress },
),
- RevertReasons.InvalidAmount,
+ RevertReason.InvalidAmount,
);
});
@@ -421,7 +421,7 @@ describe('Asset Transfer Proxies', () => {
erc20Proxy.transferFrom.sendTransactionAsync(encodedAssetData, makerAddress, takerAddress, amount, {
from: exchangeAddress,
}),
- RevertReasons.TransferFailed,
+ RevertReason.TransferFailed,
);
});
@@ -438,7 +438,7 @@ describe('Asset Transfer Proxies', () => {
amount,
{ from: notAuthorized },
),
- RevertReasons.SenderNotAuthorized,
+ RevertReason.SenderNotAuthorized,
);
});
});
@@ -493,7 +493,7 @@ describe('Asset Transfer Proxies', () => {
erc721Proxy.batchTransferFrom.sendTransactionAsync(assetData, fromAddresses, toAddresses, amounts, {
from: notAuthorized,
}),
- RevertReasons.SenderNotAuthorized,
+ RevertReason.SenderNotAuthorized,
);
});
});