aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/asset_proxy
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-20 19:25:29 +0800
committerFabio Berger <me@fabioberger.com>2018-06-20 19:25:29 +0800
commit2ffab2218584fac5d3ea2b264a7c746d963083d9 (patch)
treef7558147b811c06300e2c7697591466ae7cf48ba /packages/contracts/test/asset_proxy
parent5541327968ad6f974a37c49057253746f738a709 (diff)
parent096eaa20d785baee07b06b3f0848797e470fbda0 (diff)
downloaddexon-sol-tools-2ffab2218584fac5d3ea2b264a7c746d963083d9.tar
dexon-sol-tools-2ffab2218584fac5d3ea2b264a7c746d963083d9.tar.gz
dexon-sol-tools-2ffab2218584fac5d3ea2b264a7c746d963083d9.tar.bz2
dexon-sol-tools-2ffab2218584fac5d3ea2b264a7c746d963083d9.tar.lz
dexon-sol-tools-2ffab2218584fac5d3ea2b264a7c746d963083d9.tar.xz
dexon-sol-tools-2ffab2218584fac5d3ea2b264a7c746d963083d9.tar.zst
dexon-sol-tools-2ffab2218584fac5d3ea2b264a7c746d963083d9.zip
Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype: (22 commits) Fix closing parens in liborder Update after rebase ERC721Proxy Always call safeTransferFrom Rename makerEpoch => orderEpoch Make cancelOrdersUpTo compatible with sender abstraction Update PR template Use Image component instead of img tag Assembler orderHash function Optimize and remove redundant encodePacked Fix linting issue Fix bug where we do fetch balances on wallet login Check network state immediately instead of waiting for delay Fix onboarding persisting when changing routes Consolidate account state messaging logic Only elevate wallet zIndex when onboarding is in progress Rebase and update feedback Run linter Add Portal v2 logging Simplified handling of source < 32 edge case Basic EIP712 encoder ...
Diffstat (limited to 'packages/contracts/test/asset_proxy')
-rw-r--r--packages/contracts/test/asset_proxy/proxies.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/contracts/test/asset_proxy/proxies.ts b/packages/contracts/test/asset_proxy/proxies.ts
index 185d1639e..7f6d68e1b 100644
--- a/packages/contracts/test/asset_proxy/proxies.ts
+++ b/packages/contracts/test/asset_proxy/proxies.ts
@@ -279,7 +279,7 @@ describe('Asset Transfer Proxies', () => {
expect(newOwnerMakerAsset).to.be.bignumber.equal(takerAddress);
});
- it('should not call onERC721Received when transferring to a smart contract without receiver data', async () => {
+ it('should call onERC721Received when transferring to a smart contract without receiver data', async () => {
// Construct ERC721 asset data
const encodedAssetData = assetProxyUtils.encodeERC721AssetData(erc721Token.address, erc721MakerTokenId);
const encodedAssetDataWithoutProxyId = encodedAssetData.slice(0, -2);
@@ -300,7 +300,11 @@ describe('Asset Transfer Proxies', () => {
const logDecoder = new LogDecoder(web3Wrapper, erc721Receiver.address);
const tx = await logDecoder.getTxWithDecodedLogsAsync(txHash);
// Verify that no log was emitted by erc721 receiver
- expect(tx.logs.length).to.be.equal(0);
+ expect(tx.logs.length).to.be.equal(1);
+ const tokenReceivedLog = tx.logs[0] as LogWithDecodedArgs<TokenReceivedContractEventArgs>;
+ expect(tokenReceivedLog.args.from).to.be.equal(makerAddress);
+ expect(tokenReceivedLog.args.tokenId).to.be.bignumber.equal(erc721MakerTokenId);
+ expect(tokenReceivedLog.args.data).to.be.equal(constants.NULL_BYTES);
// Verify transfer was successful
const newOwnerMakerAsset = await erc721Token.ownerOf.callAsync(erc721MakerTokenId);
expect(newOwnerMakerAsset).to.be.bignumber.equal(erc721Receiver.address);