From 686c4b3b1147c57d46f91d49c1f9f0127df6efc7 Mon Sep 17 00:00:00 2001 From: Fahrrader Date: Tue, 14 Jun 2022 15:32:54 +0000 Subject: [PATCH] test(nesting): remove variable and const data mentions --- --- a/tests/src/nesting/nest.test.ts +++ b/tests/src/nesting/nest.test.ts @@ -322,7 +322,7 @@ await expect(executeTransaction(api, alice, api.tx.unique.createItem( collectionRFT, targetAddress, - {ReFungible: {const_data: [], pieces: 100}}, + {ReFungible: {pieces: 100}}, ))).to.not.be.rejected; // Nest a new token @@ -345,7 +345,7 @@ await expect(executeTransaction(api, alice, api.tx.unique.createItem( collectionRFT, targetAddress, - {ReFungible: {const_data: [], pieces: 100}}, + {ReFungible: {pieces: 100}}, ))).to.not.be.rejected; // Nest a new token @@ -388,7 +388,7 @@ await expect(executeTransaction(api, alice, api.tx.unique.createItem( collection, {Ethereum: tokenIdToAddress(collection, prevToken)}, - {nft: {const_data: [], variable_data: []}} as any, + {nft: {}} as any, )), 'while creating nested token').to.be.rejectedWith(/^structure\.DepthLimit$/); expect(await getTopmostTokenOwner(api, collection, prevToken)).to.be.deep.equal({Substrate: alice.address}); @@ -408,7 +408,7 @@ await expect(executeTransaction(api, bob, api.tx.unique.createItem( collection, {Ethereum: tokenIdToAddress(collection, targetToken)}, - {nft: {const_data: [], variable_data: []}} as any, + {nft: {}} as any, )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/); // Try to create and nest a token in the wrong collection @@ -435,8 +435,8 @@ await expect(executeTransaction(api, bob, api.tx.unique.createItem( collection, {Ethereum: tokenIdToAddress(collection, targetToken)}, - {nft: {const_data: [], variable_data: []}} as any, - )), 'while creating nested token').to.be.rejectedWith(/common\.AddressNotInAllowlist/); // todo is this right? + {nft: {}} as any, + )), 'while creating nested token').to.be.rejectedWith(/common\.AddressNotInAllowlist/); // Try to create and nest a token in the wrong collection const newToken = await createItemExpectSuccess(bob, collection, 'NFT'); @@ -515,7 +515,7 @@ await expect(executeTransaction(api, alice, api.tx.unique.createItem( collection, {Ethereum: tokenIdToAddress(collection, targetToken)}, - {nft: {const_data: [], variable_data: []}} as any, + {nft: {}} as any, )), 'while creating nested token').to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/); // Create a token to be nested @@ -543,7 +543,7 @@ await expect(executeTransaction(api, alice, api.tx.unique.createItem( collection, {Ethereum: tokenIdToAddress(collection, targetToken)}, - {nft: {const_data: [], variable_data: []}} as any, + {nft: {}} as any, )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/); // Try to create and nest a token in the wrong collection @@ -569,7 +569,7 @@ await expect(executeTransaction(api, alice, api.tx.unique.createItem( collection, {Ethereum: tokenIdToAddress(collection, targetToken)}, - {nft: {const_data: [], variable_data: []}} as any, + {nft: {}} as any, )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/); // Try to create and nest a token in the wrong collection @@ -591,7 +591,7 @@ await expect(executeTransaction(api, alice, api.tx.unique.createItem( collection, {Ethereum: tokenIdToAddress(collection, targetToken)}, - {nft: {const_data: [], variable_data: []}} as any, + {nft: {}} as any, )), 'while creating nested token').to.be.rejectedWith(/common\.SourceCollectionIsNotAllowedToNest/); // Try to create and nest a token in the wrong collection @@ -725,7 +725,7 @@ await expect(executeTransaction(api, alice, api.tx.unique.createItem( collectionRFT, targetAddress, - {ReFungible: {const_data: [], pieces: 100}}, + {ReFungible: {pieces: 100}}, )), 'while creating a nested token').to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/); // Create a token to be nested @@ -761,7 +761,7 @@ await expect(executeTransaction(api, alice, api.tx.unique.createItem( collectionRFT, targetAddress, - {ReFungible: {const_data: [], pieces: 100}}, + {ReFungible: {pieces: 100}}, )), 'while creating a nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/); // Try to create and nest a token in the wrong collection @@ -788,7 +788,7 @@ await expect(executeTransaction(api, alice, api.tx.unique.createItem( collectionRFT, targetAddress, - {ReFungible: {const_data: [], pieces: 100}}, + {ReFungible: {pieces: 100}}, )), 'while creating a nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/); // Try to create and nest a token in the wrong collection @@ -812,7 +812,7 @@ await expect(executeTransaction(api, alice, api.tx.unique.createItem( collectionRFT, targetAddress, - {ReFungible: {const_data: [], pieces: 100}}, + {ReFungible: {pieces: 100}}, )), 'while creating a nested token').to.be.rejectedWith(/common\.SourceCollectionIsNotAllowedToNest/); // Try to create and nest a token in the wrong collection -- gitstuff