git.delta.rocks / unique-network / refs/commits / 603147b1fffd

difftreelog

fix wait for proposal to pass

Daniel Shiposha2023-04-13parent: #bcc1c22.patch.diff
in: master

1 file changed

modifiedtests/src/util/playgrounds/unique.dev.tsdiffbeforeafterboth
635 // <<< Fast track proposal through technical committee <<<635 // <<< Fast track proposal through technical committee <<<
636636
637 const refIndexField = 0;637 const refIndexField = 0;
638 const referendumIndex = await this.helper.wait.eventData<any>(3, 'democracy', 'Started', refIndexField);638 const referendumIndex = await this.helper.wait.eventData<number>(3, 'democracy', 'Started', refIndexField);
639639
640 // >>> Referendum voting >>>640 // >>> Referendum voting >>>
641 console.log(`\t* Referendum #${referendumIndex} voting.......`);641 console.log(`\t* Referendum #${referendumIndex} voting.......`);
642 await this.helper.democracy.referendumVote(dorothyAccount, referendumIndex, {642 await this.helper.democracy.referendumVote(dorothyAccount, referendumIndex!, {
643 balance: 10_000_000_000_000_000_000n,643 balance: 10_000_000_000_000_000_000n,
644 vote: {aye: true, conviction: 1},644 vote: {aye: true, conviction: 1},
645 });645 });
646 console.log(`\t* Referendum #${referendumIndex} voting.......DONE`);646 console.log(`\t* Referendum #${referendumIndex} voting.......DONE`);
647 // <<< Referendum voting <<<647 // <<< Referendum voting <<<
648648
649 // Wait for the democracy execute649 // Wait the proposal to pass
650 await this.helper.wait.event(3, 'democracy', 'Passed');
650 await this.helper.wait.newBlocks(5);651 await this.helper.wait.newBlocks(1);
651652
652 console.log(`[democracy] executing '${proposalDesciption}' proposal.......DONE`);653 console.log(`[democracy] executing '${proposalDesciption}' proposal.......DONE`);
653 }654 }