Skip to content

Commit

Permalink
moved the idle period to the first
Browse files Browse the repository at this point in the history
  • Loading branch information
mkbeefcake committed Nov 14, 2023
1 parent 9491b1d commit 69dc2ff
Show file tree
Hide file tree
Showing 2 changed files with 147 additions and 113 deletions.
13 changes: 8 additions & 5 deletions packages/ui/src/app/pages/Election/Election.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MocksParameters } from '@/mocks/providers'
import { Election } from './Election'

type Args = {
electionStage: 'announcing' | 'revealing' | 'voting' | 'idle'
electionStage: 'announcing' | 'revealing' | 'voting' | 'inactive'
remainingPeriod?: number | BN
currentBlock?: number | BN
}
Expand All @@ -20,7 +20,7 @@ export default {
component: Election,
args: {
electionStage: 'announcing',
remainingPeriod: 40000,
remainingPeriod: 10000,
currentBlock: 4802561,
},
parameters: {
Expand All @@ -31,7 +31,7 @@ export default {
consts: {
council: {
councilSize: new BN(3),
idlePeriodDuration: new BN(1),
idlePeriodDuration: new BN(14400),
announcingPeriodDuration: new BN(129600),
budgetRefillPeriod: new BN(14400),
minCandidateStake: new BN(1666666666660000),
Expand All @@ -53,10 +53,13 @@ export default {
council: {
stage: {
stage: {
isIdle: args.electionStage === 'idle' ? true : false,
isIdle: args.electionStage === 'inactive' ? true : false,
isAnnouncing: args.electionStage === 'announcing' ? true : false,
},
changedAt: Number(args.currentBlock) - Number(new BN(129600)) + Number(args.remainingPeriod),
changedAt:
args.electionStage === 'inactive'
? Number(args.currentBlock) - Number(new BN(14400)) + Number(args.remainingPeriod)
: Number(args.currentBlock) - Number(new BN(129600)) + Number(args.remainingPeriod),
},
},
referendum: {
Expand Down
Loading

0 comments on commit 69dc2ff

Please sign in to comment.