From ed290c7b29d89298fdae128979cf8ae7a0187620 Mon Sep 17 00:00:00 2001 From: Greg Zaitsev Date: Mon, 21 Dec 2020 16:15:35 +0000 Subject: [PATCH] Merge pull request #41 from usetech-llc/features/NFTPAR-240(path) Update helpers.ts --- --- a/tests/src/util/helpers.ts +++ b/tests/src/util/helpers.ts @@ -35,7 +35,7 @@ export async function createCollectionExpectSuccess(name: string, description: string, tokenPrefix: string, mode: string) { await usingApi(async (api) => { // Get number of collections before the transaction - const AcollectionCount = parseInt((await api.query.nft.collectionCount()).toString()); + const AcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString()); // Run the CreateCollection transaction const alicePrivateKey = privateKey('//Alice'); @@ -44,7 +44,7 @@ const result = getCreateCollectionResult(events); // Get number of collections after the transaction - const BcollectionCount = parseInt((await api.query.nft.collectionCount()).toString()); + const BcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString()); // Get the collection const collection: any = (await api.query.nft.collection(result.collectionId)).toJSON(); @@ -64,7 +64,7 @@ export async function createCollectionExpectFailure(name: string, description: string, tokenPrefix: string, mode: string) { await usingApi(async (api) => { // Get number of collections before the transaction - const AcollectionCount = parseInt((await api.query.nft.collectionCount()).toString()); + const AcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString()); // Run the CreateCollection transaction const alicePrivateKey = privateKey('//Alice'); @@ -73,11 +73,11 @@ const result = getCreateCollectionResult(events); // Get number of collections after the transaction - const BcollectionCount = parseInt((await api.query.nft.collectionCount()).toString()); + const BcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString()); // What to expect expect(result.success).to.be.false; expect(BcollectionCount).to.be.equal(AcollectionCount, 'Error: Collection with incorrect data created.'); }); } - \ No newline at end of file + -- gitstuff