git.delta.rocks / unique-network / refs/commits / 3e664068170a

difftreelog

fix notePreimage pallet for unq/qtz

Daniel Shiposha2022-12-22parent: #2d180a9.patch.diff
in: master

2 files changed

modifiedtests/src/util/playgrounds/unique.dev.tsdiffbeforeafterboth
--- a/tests/src/util/playgrounds/unique.dev.ts
+++ b/tests/src/util/playgrounds/unique.dev.ts
@@ -150,6 +150,7 @@
 
   constructor(logger: { log: (msg: any, level: any) => void, level: any }, options: {[key: string]: any} = {}) {
     options.helperBase = options.helperBase ?? DevMoonbeamHelper;
+    options.notePreimagePallet = options.notePreimagePallet ?? 'democracy';
 
     super(logger, options);
     this.account = new MoonbeamAccountGroup(this);
@@ -157,7 +158,12 @@
   }
 }
 
-export class DevMoonriverHelper extends DevMoonbeamHelper {}
+export class DevMoonriverHelper extends DevMoonbeamHelper {
+  constructor(logger: { log: (msg: any, level: any) => void, level: any }, options: {[key: string]: any} = {}) {
+    options.notePreimagePallet = options.notePreimagePallet ?? 'preimage';
+    super(logger, options);
+  }
+}
 
 export class DevAcalaHelper extends AcalaHelper {
   wait: WaitGroup;
modifiedtests/src/util/playgrounds/unique.tsdiffbeforeafterboth
2874}2874}
28752875
2876class MoonbeamDemocracyGroup extends HelperGroup<MoonbeamHelper> {2876class MoonbeamDemocracyGroup extends HelperGroup<MoonbeamHelper> {
2877 notePreimagePallet: string;
2878
2879 constructor(helper: MoonbeamHelper, options: {[key: string]: any} = {}) {
2880 super(helper);
2881 this.notePreimagePallet = options.notePreimagePallet;
2882 }
2883
2877 async notePreimage(signer: TSigner, encodedProposal: string) {2884 async notePreimage(signer: TSigner, encodedProposal: string) {
2878 await this.helper.executeExtrinsic(signer, 'api.tx.preimage.notePreimage', [encodedProposal], true);2885 await this.helper.executeExtrinsic(signer, `api.tx.${this.notePreimagePallet}.notePreimage`, [encodedProposal], true);
2879 }2886 }
28802887
2881 externalProposeMajority(proposal: any) {2888 externalProposeMajority(proposal: any) {
3013 this.assetManager = new MoonbeamAssetManagerGroup(this);3020 this.assetManager = new MoonbeamAssetManagerGroup(this);
3014 this.assets = new AssetsGroup(this);3021 this.assets = new AssetsGroup(this);
3015 this.xTokens = new XTokensGroup(this);3022 this.xTokens = new XTokensGroup(this);
3016 this.democracy = new MoonbeamDemocracyGroup(this);3023 this.democracy = new MoonbeamDemocracyGroup(this, options);
3017 this.collective = {3024 this.collective = {
3018 council: new MoonbeamCollectiveGroup(this, 'councilCollective'),3025 council: new MoonbeamCollectiveGroup(this, 'councilCollective'),
3019 techCommittee: new MoonbeamCollectiveGroup(this, 'techCommitteeCollective'),3026 techCommittee: new MoonbeamCollectiveGroup(this, 'techCommitteeCollective'),