git.delta.rocks / unique-network / refs/commits / 3109c4721370

difftreelog

fix XCM Moonbeam tests

Daniel Shiposha2023-02-01parent: #e31d9d0.patch.diff
in: master

2 files changed

modifiedtests/src/util/playgrounds/unique.dev.tsdiffbeforeafterboth
159159
160 constructor(logger: { log: (msg: any, level: any) => void, level: any }, options: {[key: string]: any} = {}) {160 constructor(logger: { log: (msg: any, level: any) => void, level: any }, options: {[key: string]: any} = {}) {
161 options.helperBase = options.helperBase ?? DevMoonbeamHelper;161 options.helperBase = options.helperBase ?? DevMoonbeamHelper;
162 options.notePreimagePallet = options.notePreimagePallet ?? 'democracy';162 options.notePreimagePallet = options.notePreimagePallet ?? 'preimage';
163163
164 super(logger, options);164 super(logger, options);
165 this.account = new MoonbeamAccountGroup(this);165 this.account = new MoonbeamAccountGroup(this);
modifiedtests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth
--- a/tests/src/xcm/xcmUnique.test.ts
+++ b/tests/src/xcm/xcmUnique.test.ts
@@ -760,7 +760,7 @@
 
       // >>> Propose external motion through council >>>
       console.log('Propose external motion through council.......');
-      const externalMotion = helper.democracy.externalProposeMajority(proposalHash);
+      const externalMotion = helper.democracy.externalProposeMajority({Legacy: proposalHash});
       const encodedMotion = externalMotion?.method.toHex() || '';
       const motionHash = blake2AsHex(encodedMotion);
       console.log('Motion hash is %s', motionHash);
@@ -771,7 +771,16 @@
       await helper.collective.council.vote(dorothyAccount, motionHash, councilProposalIdx, true);
       await helper.collective.council.vote(baltatharAccount, motionHash, councilProposalIdx, true);
 
-      await helper.collective.council.close(dorothyAccount, motionHash, councilProposalIdx, 1_000_000_000, externalMotion.encodedLength);
+      await helper.collective.council.close(
+        dorothyAccount,
+        motionHash,
+        councilProposalIdx,
+        {
+          refTime: 1_000_000_000,
+          proofSize: 1_000_000,
+        },
+        externalMotion.encodedLength,
+      );
       console.log('Propose external motion through council.......DONE');
       // <<< Propose external motion through council <<<
 
@@ -788,7 +797,16 @@
       await helper.collective.techCommittee.vote(baltatharAccount, fastTrackHash, techProposalIdx, true);
       await helper.collective.techCommittee.vote(alithAccount, fastTrackHash, techProposalIdx, true);
 
-      await helper.collective.techCommittee.close(baltatharAccount, fastTrackHash, techProposalIdx, 1_000_000_000, fastTrack.encodedLength);
+      await helper.collective.techCommittee.close(
+        baltatharAccount,
+        fastTrackHash,
+        techProposalIdx,
+        {
+          refTime: 1_000_000_000,
+          proofSize: 1_000_000,
+        },
+        fastTrack.encodedLength,
+      );
       console.log('Fast track proposal through technical committee.......DONE');
       // <<< Fast track proposal through technical committee <<<