git.delta.rocks / unique-network / refs/commits / d5edba8762a3

difftreelog

fix use transferFrom in Ouroboros detection test

Daniel Shiposha2022-06-29parent: #931e50f.patch.diff
in: master

1 file changed

modifiedtests/src/nesting/graphs.test.tsdiffbeforeafterboth
36 await usingApi(async (api, privateKeyWrapper) => {36 await usingApi(async (api, privateKeyWrapper) => {
37 const alice = privateKeyWrapper('//Alice');37 const alice = privateKeyWrapper('//Alice');
38 const collection = await buildComplexObjectGraph(api, alice);38 const collection = await buildComplexObjectGraph(api, alice);
39 await setCollectionLimitsExpectSuccess(alice, collection, {ownerCanTransfer: true});39 const tokenTwoParent = tokenIdToCross(collection, 1);
4040
41 // to self41 // to self
42 await expect(42 await expect(
49 'second transaction',49 'second transaction',
50 ).to.be.rejectedWith(/structure\.OuroborosDetected/);50 ).to.be.rejectedWith(/structure\.OuroborosDetected/);
51 await expect(51 await expect(
52 executeTransaction(api, alice, api.tx.unique.transfer(tokenIdToCross(collection, 8), collection, 2, 1)),52 executeTransaction(api, alice, api.tx.unique.transferFrom(tokenTwoParent, tokenIdToCross(collection, 8), collection, 2, 1)),
53 'third transaction',53 'third transaction',
54 ).to.be.rejectedWith(/structure\.OuroborosDetected/);54 ).to.be.rejectedWith(/structure\.OuroborosDetected/);
55 });55 });