-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DDW-796] Implement catalyst state snapshot phase #2771
[DDW-796] Implement catalyst state snapshot phase #2771
Conversation
@@ -86,6 +86,10 @@ mainnet-genesis-dryrun-with-stakeholders.json | |||
|
|||
# nix-build results | |||
result* | |||
!result*.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result*
was ignoring any files that start with result
(ResultsPhase.js).
The following file globs are excluding js/ts files
@@ -1,132 +1,30 @@ | |||
// @flow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the voting registration is always open now, the voting closed logic was removed.
7b894a8
to
ad76db3
Compare
export const VOTING_REGISTRATION_NEW_START_DATE = new Date( | ||
'Nov 11, 2021, 11:00 UTC' | ||
); | ||
export const VOTING_PHASE_CHECK_INTERVAL = 60000; // 60 seconds | unit: milliseconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Increased the check interval to 60 seconds to be able to force different phases for tests. We can change back to 3 seconds after QA review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 seconds? I would even do this every 10 mins?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It used to be 3 seconds for voting registration end check. I increased so QA would have a longer interval to test, but I agree 3 seconds is too short of interval for this
[FundPhases.RESULTS]: (date: Date) => date >= VOTING_RESULTS_DATE, | ||
}; | ||
this.fundPhase = | ||
Object.keys(FundPhases) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to use this:
Object.keys(FundPhases).map((phase) => FundPhases[phase])
Instead of:
Object.values(FundPhases)
Due to flow not inferring the type correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had solved it with a switch case maybe, but your solution is also OK.
Hey, I wonder what is the reasoning behind hard-coding below dates instead of read them from catalyst backend:
I think all above dates can be easily retrieved from Catalyst servicing station. The only problem I see is with |
Hi @dkijania, I'm not aware of catalyst backend. Could you point me to some documentation? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
visually looks good
source/renderer/app/components/voting/voting-info/VotingInfo.scss
Outdated
Show resolved
Hide resolved
@lucas-barros great work! I added a few suggestions in case you find them useful. It would also be interesting to add a few ui or unit tests in case you have time. |
@renanvalentin I will, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Good work @lucas-barros 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Great work @lucas-barros 👍
3140b65
to
8303429
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean and elegant implemented, nothing to complain. Great job!
This PR adds the catalyst fund snapshot, voting and tallying phase and the logic to change the text based on the fund phase.
This includes tasks:
DDW-796
DDW-801
DDW-802
DDW-845
To force switch between phases during tests:
window.daedalus.stores.voting._checkFundPhase(new Date('Feb 28, 2022, 11:00 UTC'))
*change the date accordingly
Phases
Todos
Screenshots
Snapshot
Voting
Tallying
Results
Testing Checklist
Test Scenarios
Scenario 1 - Validate voting screen on ETI phase
Scenario 2 - Validate voting screen on Snapshot phase
Scenario 3 - Validate voting screen on Voting phase
Scenario 4 - Validate voting screen on Tallying phase
Review Checklist
Basics
feature
/bug
/chore
,release-x.x.x
)yarn test
)yarn dev
)yarn package
/ CI builds)yarn flow:test
)yarn lint
)yarn prettier:check
)yarn manage:translations
produces no changes)yarn storybook
)yarn.lock
file is updatedCode Quality
Testing
After Review
done
column on the YouTrack board