git.delta.rocks / unique-network / refs/commits / 7108cf7ae429

difftreelog

Fix tests: lost await

Max Andreev2022-12-22parent: #31fca65.patch.diff
in: master

3 files changed

modifiedtests/src/eth/createFTCollection.test.tsdiffbeforeafterboth
--- a/tests/src/eth/createFTCollection.test.ts
+++ b/tests/src/eth/createFTCollection.test.ts
@@ -96,7 +96,7 @@
       .to.be.true;
 
     // check collectionOwner:
-    const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'ft', owner, true);
+    const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner, true);
     const collectionOwner = await collectionEvm.methods.collectionOwner().call();
     expect(helper.address.restoreCrossAccountFromBigInt(BigInt(collectionOwner.sub))).to.eq(helper.address.ethToSubstrate(owner));
   });
modifiedtests/src/eth/createNFTCollection.test.tsdiffbeforeafterboth
136 .to.be.true;136 .to.be.true;
137137
138 // check collectionOwner:138 // check collectionOwner:
139 const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'ft', owner, true);139 const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner, true);
140 const collectionOwner = await collectionEvm.methods.collectionOwner().call();140 const collectionOwner = await collectionEvm.methods.collectionOwner().call();
141 expect(helper.address.restoreCrossAccountFromBigInt(BigInt(collectionOwner.sub))).to.eq(helper.address.ethToSubstrate(owner));141 expect(helper.address.restoreCrossAccountFromBigInt(BigInt(collectionOwner.sub))).to.eq(helper.address.ethToSubstrate(owner));
142 });142 });
modifiedtests/src/eth/createRFTCollection.test.tsdiffbeforeafterboth
--- a/tests/src/eth/createRFTCollection.test.ts
+++ b/tests/src/eth/createRFTCollection.test.ts
@@ -147,7 +147,7 @@
       .to.be.true;
 
     // check collectionOwner:
-    const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'ft', owner, true);
+    const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner, true);
     const collectionOwner = await collectionEvm.methods.collectionOwner().call();
     expect(helper.address.restoreCrossAccountFromBigInt(BigInt(collectionOwner.sub))).to.eq(helper.address.ethToSubstrate(owner));
   });