git.delta.rocks / unique-network / refs/commits / 04b203b44245

difftreelog

tests: check transfer result

Yaroslav Bolyukin2021-02-17parent: #900ad30.patch.diff
in: master

1 file changed

modifiedtests/src/util/helpers.tsdiffbeforeafterboth
654 }654 }
655 const transferTx = await api.tx.nft.transfer(recipient.address, collectionId, tokenId, value);655 const transferTx = await api.tx.nft.transfer(recipient.address, collectionId, tokenId, value);
656 const events = await submitTransactionAsync(sender, transferTx);656 const events = await submitTransactionAsync(sender, transferTx);
657 const result = getCreateItemResult(events);657 const result = getTransferResult(events);
658 // tslint:disable-next-line:no-unused-expression658 // tslint:disable-next-line:no-unused-expression
659 expect(result.success).to.be.true;659 expect(result.success).to.be.true;
660 expect(result.collectionId).to.be.equal(collectionId);
661 expect(result.itemId).to.be.equal(tokenId);
662 expect(result.sender).to.be.equal(sender.address);
663 expect(result.recipient).to.be.equal(recipient.address);
664 expect(result.value.toString()).to.be.equal(value.toString());
660 if (type === 'NFT') {665 if (type === 'NFT') {
661 const nftItemData = await api.query.nft.nftItemList(collectionId, tokenId) as unknown as ITokenDataType;666 const nftItemData = await api.query.nft.nftItemList(collectionId, tokenId) as unknown as ITokenDataType;
662 expect(nftItemData.Owner.toString()).to.be.equal(recipient.address);667 expect(nftItemData.Owner.toString()).to.be.equal(recipient.address);