git.delta.rocks / unique-network / refs/commits / 2fb1f776e4b9

difftreelog

fix remove mintDefaultCollection

Daniel Shiposha2022-09-14parent: #bd337d6.patch.diff
in: master

2 files changed

modifiedtests/src/.outdated/scheduler.test.tsdiffbeforeafterboth
--- a/tests/src/.outdated/scheduler.test.ts
+++ b/tests/src/.outdated/scheduler.test.ts
@@ -54,7 +54,7 @@
   });
 
   itSub.ifWithPallets('Can delay a transfer of an owned token', [Pallets.Scheduler], async ({helper}) => {
-    const collection = await helper.nft.mintDefaultCollection(alice);
+    const collection = await helper.nft.mintCollection(alice, {tokenPrefix: 'schd'});
     const token = await collection.mintToken(alice);
     const schedulerId = await helper.scheduler.makeScheduledId();
     const blocksBeforeExecution = 4;
@@ -104,7 +104,7 @@
   });
 
   itSub.ifWithPallets('Can cancel a scheduled operation which has not yet taken effect', [Pallets.Scheduler], async ({helper}) => {
-    const collection = await helper.nft.mintDefaultCollection(alice);
+    const collection = await helper.nft.mintCollection(alice, {tokenPrefix: 'schd'});
     const token = await collection.mintToken(alice);
 
     const scheduledId = await helper.scheduler.makeScheduledId();
@@ -357,7 +357,7 @@
   });
 
   itSub.ifWithPallets("Can't overwrite a scheduled ID", [Pallets.Scheduler, Pallets.TestUtils], async ({helper}) => {
-    const collection = await helper.nft.mintDefaultCollection(alice);
+    const collection = await helper.nft.mintCollection(alice, {tokenPrefix: 'schd'});
     const token = await collection.mintToken(alice);
 
     const scheduledId = await helper.scheduler.makeScheduledId();
@@ -387,7 +387,7 @@
   });
 
   itSub.ifWithPallets("Can't cancel a non-owned scheduled operation", [Pallets.Scheduler, Pallets.TestUtils], async ({helper}) => {
-    const collection = await helper.nft.mintDefaultCollection(alice);
+    const collection = await helper.nft.mintCollection(alice, {tokenPrefix: 'schd'});
     const token = await collection.mintToken(alice);
 
     const scheduledId = await helper.scheduler.makeScheduledId();
modifiedtests/src/util/playgrounds/unique.tsdiffbeforeafterboth
1373 return this.getCollectionObject(this.helper.util.extractCollectionIdFromCreationResult(creationResult));1373 return this.getCollectionObject(this.helper.util.extractCollectionIdFromCreationResult(creationResult));
1374 }1374 }
1375
1376 async mintDefaultCollection(signer: TSigner, mode: 'NFT' | 'RFT'): Promise<UniqueCollectionBase> {
1377 const defaultCreateCollectionParams: ICollectionCreationOptions = {
1378 description: 'description',
1379 name: 'name',
1380 tokenPrefix: 'prfx',
1381 };
1382
1383 return this.mintCollection(signer, defaultCreateCollectionParams, mode);
1384 }
13851375
1386 getCollectionObject(_collectionId: number): any {1376 getCollectionObject(_collectionId: number): any {
1387 return null;1377 return null;
1567 return await super.mintCollection(signer, collectionOptions, 'NFT') as UniqueNFTCollection;1557 return await super.mintCollection(signer, collectionOptions, 'NFT') as UniqueNFTCollection;
1568 }1558 }
1569
1570 async mintDefaultCollection(signer: IKeyringPair): Promise<UniqueNFTCollection> {
1571 return await super.mintDefaultCollection(signer, 'NFT') as UniqueNFTCollection;
1572 }
15731559
1574 /**1560 /**
1575 * Mint new token1561 * Mint new token
1757 return await super.mintCollection(signer, collectionOptions, 'RFT') as UniqueRFTCollection;1743 return await super.mintCollection(signer, collectionOptions, 'RFT') as UniqueRFTCollection;
1758 }1744 }
1759
1760 async mintDefaultCollection(signer: IKeyringPair): Promise<UniqueRFTCollection> {
1761 return await super.mintDefaultCollection(signer, 'RFT') as UniqueRFTCollection;
1762 }
17631745
1764 /**1746 /**
1765 * Mint new token1747 * Mint new token