difftreelog
test(nesting) remove variable and const data mentions
in: master
1 file changed
tests/src/nesting/nest.test.tsdiffbeforeafterboth322 await expect(executeTransaction(api, alice, api.tx.unique.createItem(322 await expect(executeTransaction(api, alice, api.tx.unique.createItem(323 collectionRFT,323 collectionRFT,324 targetAddress,324 targetAddress,325 {ReFungible: {const_data: [], pieces: 100}},325 {ReFungible: {pieces: 100}},326 ))).to.not.be.rejected;326 ))).to.not.be.rejected;327327328 // Nest a new token328 // Nest a new token345 await expect(executeTransaction(api, alice, api.tx.unique.createItem(345 await expect(executeTransaction(api, alice, api.tx.unique.createItem(346 collectionRFT,346 collectionRFT,347 targetAddress,347 targetAddress,348 {ReFungible: {const_data: [], pieces: 100}},348 {ReFungible: {pieces: 100}},349 ))).to.not.be.rejected;349 ))).to.not.be.rejected;350350351 // Nest a new token351 // Nest a new token388 await expect(executeTransaction(api, alice, api.tx.unique.createItem(388 await expect(executeTransaction(api, alice, api.tx.unique.createItem(389 collection,389 collection,390 {Ethereum: tokenIdToAddress(collection, prevToken)},390 {Ethereum: tokenIdToAddress(collection, prevToken)},391 {nft: {const_data: [], variable_data: []}} as any,391 {nft: {}} as any,392 )), 'while creating nested token').to.be.rejectedWith(/^structure\.DepthLimit$/);392 )), 'while creating nested token').to.be.rejectedWith(/^structure\.DepthLimit$/);393393394 expect(await getTopmostTokenOwner(api, collection, prevToken)).to.be.deep.equal({Substrate: alice.address});394 expect(await getTopmostTokenOwner(api, collection, prevToken)).to.be.deep.equal({Substrate: alice.address});408 await expect(executeTransaction(api, bob, api.tx.unique.createItem(408 await expect(executeTransaction(api, bob, api.tx.unique.createItem(409 collection,409 collection,410 {Ethereum: tokenIdToAddress(collection, targetToken)},410 {Ethereum: tokenIdToAddress(collection, targetToken)},411 {nft: {const_data: [], variable_data: []}} as any,411 {nft: {}} as any,412 )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);412 )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);413413414 // Try to create and nest a token in the wrong collection414 // Try to create and nest a token in the wrong collection435 await expect(executeTransaction(api, bob, api.tx.unique.createItem(435 await expect(executeTransaction(api, bob, api.tx.unique.createItem(436 collection,436 collection,437 {Ethereum: tokenIdToAddress(collection, targetToken)},437 {Ethereum: tokenIdToAddress(collection, targetToken)},438 {nft: {const_data: [], variable_data: []}} as any,438 {nft: {}} as any,439 )), 'while creating nested token').to.be.rejectedWith(/common\.AddressNotInAllowlist/); // todo is this right?439 )), 'while creating nested token').to.be.rejectedWith(/common\.AddressNotInAllowlist/); 440440441 // Try to create and nest a token in the wrong collection441 // Try to create and nest a token in the wrong collection442 const newToken = await createItemExpectSuccess(bob, collection, 'NFT');442 const newToken = await createItemExpectSuccess(bob, collection, 'NFT');515 await expect(executeTransaction(api, alice, api.tx.unique.createItem(515 await expect(executeTransaction(api, alice, api.tx.unique.createItem(516 collection,516 collection,517 {Ethereum: tokenIdToAddress(collection, targetToken)},517 {Ethereum: tokenIdToAddress(collection, targetToken)},518 {nft: {const_data: [], variable_data: []}} as any,518 {nft: {}} as any,519 )), 'while creating nested token').to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/);519 )), 'while creating nested token').to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/);520520521 // Create a token to be nested521 // Create a token to be nested543 await expect(executeTransaction(api, alice, api.tx.unique.createItem(543 await expect(executeTransaction(api, alice, api.tx.unique.createItem(544 collection,544 collection,545 {Ethereum: tokenIdToAddress(collection, targetToken)},545 {Ethereum: tokenIdToAddress(collection, targetToken)},546 {nft: {const_data: [], variable_data: []}} as any,546 {nft: {}} as any,547 )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);547 )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);548548549 // Try to create and nest a token in the wrong collection549 // Try to create and nest a token in the wrong collection569 await expect(executeTransaction(api, alice, api.tx.unique.createItem(569 await expect(executeTransaction(api, alice, api.tx.unique.createItem(570 collection,570 collection,571 {Ethereum: tokenIdToAddress(collection, targetToken)},571 {Ethereum: tokenIdToAddress(collection, targetToken)},572 {nft: {const_data: [], variable_data: []}} as any,572 {nft: {}} as any,573 )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);573 )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);574574575 // Try to create and nest a token in the wrong collection575 // Try to create and nest a token in the wrong collection591 await expect(executeTransaction(api, alice, api.tx.unique.createItem(591 await expect(executeTransaction(api, alice, api.tx.unique.createItem(592 collection,592 collection,593 {Ethereum: tokenIdToAddress(collection, targetToken)},593 {Ethereum: tokenIdToAddress(collection, targetToken)},594 {nft: {const_data: [], variable_data: []}} as any,594 {nft: {}} as any,595 )), 'while creating nested token').to.be.rejectedWith(/common\.SourceCollectionIsNotAllowedToNest/);595 )), 'while creating nested token').to.be.rejectedWith(/common\.SourceCollectionIsNotAllowedToNest/);596596597 // Try to create and nest a token in the wrong collection597 // Try to create and nest a token in the wrong collection725 await expect(executeTransaction(api, alice, api.tx.unique.createItem(725 await expect(executeTransaction(api, alice, api.tx.unique.createItem(726 collectionRFT,726 collectionRFT,727 targetAddress,727 targetAddress,728 {ReFungible: {const_data: [], pieces: 100}},728 {ReFungible: {pieces: 100}},729 )), 'while creating a nested token').to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/);729 )), 'while creating a nested token').to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/);730730731 // Create a token to be nested731 // Create a token to be nested761 await expect(executeTransaction(api, alice, api.tx.unique.createItem(761 await expect(executeTransaction(api, alice, api.tx.unique.createItem(762 collectionRFT,762 collectionRFT,763 targetAddress,763 targetAddress,764 {ReFungible: {const_data: [], pieces: 100}},764 {ReFungible: {pieces: 100}},765 )), 'while creating a nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);765 )), 'while creating a nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);766766767 // Try to create and nest a token in the wrong collection767 // Try to create and nest a token in the wrong collection788 await expect(executeTransaction(api, alice, api.tx.unique.createItem(788 await expect(executeTransaction(api, alice, api.tx.unique.createItem(789 collectionRFT,789 collectionRFT,790 targetAddress,790 targetAddress,791 {ReFungible: {const_data: [], pieces: 100}},791 {ReFungible: {pieces: 100}},792 )), 'while creating a nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);792 )), 'while creating a nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);793793794 // Try to create and nest a token in the wrong collection794 // Try to create and nest a token in the wrong collection812 await expect(executeTransaction(api, alice, api.tx.unique.createItem(812 await expect(executeTransaction(api, alice, api.tx.unique.createItem(813 collectionRFT,813 collectionRFT,814 targetAddress,814 targetAddress,815 {ReFungible: {const_data: [], pieces: 100}},815 {ReFungible: {pieces: 100}},816 )), 'while creating a nested token').to.be.rejectedWith(/common\.SourceCollectionIsNotAllowedToNest/);816 )), 'while creating a nested token').to.be.rejectedWith(/common\.SourceCollectionIsNotAllowedToNest/);817817818 // Try to create and nest a token in the wrong collection818 // Try to create and nest a token in the wrong collection