git.delta.rocks / unique-network / refs/commits / 46f8534a87d1

difftreelog

test set amount of NFT/RFT to burn

Yaroslav Bolyukin2021-10-27parent: #73456d1.patch.diff
in: master

2 files changed

modifiedtests/src/burnItem.test.tsdiffbeforeafterboth
239 const tokenId = 10;239 const tokenId = 10;
240240
241 await usingApi(async (api) => {241 await usingApi(async (api) => {
242 const tx = api.tx.nft.burnItem(collectionId, tokenId, 0);242 const tx = api.tx.nft.burnItem(collectionId, tokenId, 1);
243 const badTransaction = async function () { 243 const badTransaction = async function () {
244 await submitTransactionExpectFailAsync(alice, tx);244 await submitTransactionExpectFailAsync(alice, tx);
245 };245 };
270270
271 await usingApi(async (api) => {271 await usingApi(async (api) => {
272272
273 const burntx = api.tx.nft.burnItem(collectionId, tokenId, 0);273 const burntx = api.tx.nft.burnItem(collectionId, tokenId, 1);
274 const events1 = await submitTransactionAsync(alice, burntx);274 const events1 = await submitTransactionAsync(alice, burntx);
275 const result1 = getGenericResult(events1);275 const result1 = getGenericResult(events1);
276 expect(result1.success).to.be.true;276 expect(result1.success).to.be.true;
modifiedtests/src/transferFrom.test.tsdiffbeforeafterboth
265 await usingApi(async () => {265 await usingApi(async () => {
266 const reFungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});266 const reFungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});
267 const newReFungibleTokenId = await createItemExpectSuccess(Alice, reFungibleCollectionId, 'ReFungible');267 const newReFungibleTokenId = await createItemExpectSuccess(Alice, reFungibleCollectionId, 'ReFungible');
268 await burnItemExpectSuccess(Alice, reFungibleCollectionId, newReFungibleTokenId, 1);268 await burnItemExpectSuccess(Alice, reFungibleCollectionId, newReFungibleTokenId, 100);
269 await approveExpectFail(reFungibleCollectionId, newReFungibleTokenId, Alice, Bob);269 await approveExpectFail(reFungibleCollectionId, newReFungibleTokenId, Alice, Bob);
270 await transferFromExpectFail(reFungibleCollectionId, newReFungibleTokenId, Bob, Alice, Charlie, 1);270 await transferFromExpectFail(reFungibleCollectionId, newReFungibleTokenId, Bob, Alice, Charlie, 1);
271271