-
Notifications
You must be signed in to change notification settings - Fork 5
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
Featured voting #37
Featured voting #37
Conversation
jkbktl
commented
May 15, 2023
•
edited
edited
- load initial SNT amount from proposal vote (contract?)
- load cooldown period for communities which were featured and cannot be voted for again (contract?)
- verification
- testing
@jkbktl is attempting to deploy a commit to the Status Team on Vercel. A member of the Team first needs to authorize it. |
<ConfirmBtn | ||
onClick={() => { | ||
setShowModal(false) | ||
history.go(0) |
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.
Added reload of the page, so user can see newly proposed votings.
@@ -0,0 +1,12 @@ | |||
import React from 'react' |
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.
Newly created page, so we can show featured communities.
@@ -25,7 +25,7 @@ export function App() { | |||
<Page> | |||
<GlobalStyle /> | |||
{mobileVersion ? <MobileRouter /> : <DesktopRouter />} | |||
<NotificationsList /> | |||
{/* <NotificationsList /> */} |
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.
This is commented out, because of some issue which was breaking whole page. Needs to be debugged.
@@ -14,6 +14,7 @@ export function NotificationsList() { | |||
{notifications.map((notification) => { | |||
if ('receipt' in notification) { | |||
return notification.receipt.logs.map((log) => { | |||
// this needs to be updated so it takes into account also interface of featuredVotingContract | |||
const parsedLog = votingContract.interface.parseLog(log) |
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.
Here is the issue with NotificationList, it accept list of notifications which can be emmited by both contracts (voting and featuredVoting), but there is currently no way how to differentiate notification item and therefore parse it by parser with correct interface. If notification item is parsed by wrong parser it throws an exception and crashes whole page.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Guys, it's ready for review, please check it out when you have a bit of time. I cannot add you as reviewers for some reason. cc @osmaczko @prichodko |
Cool! I am on it. Could you please check tests as they are failing on CI? |
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.
Overall looks good, thanks for implementation. However, I did spot a few minor issues:
- Once the directory vote is finalized the view is not updated
dapp-1-2023-05-31_12.08.58.mp4
- It should not be possible to vote more than once for featured community from the same account
dapp-2-2023-05-31_12.09.39.mp4
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.
Thanks. It mostly works as expected, I identified few issues:
- (blocker) Peers should be able to vote for more than one community
dapp-go-through-2023-06-28_09.05.05-00.08.45.568-00.09.22.560-seg1.mp4
- (blocker) "Verify Weekly featured" doesn't work for consecutive votings (works only for first voting)
dapp-go-through-2023-06-28_09.05.05-00.17.05.311-00.18.00.475-seg2.mp4
- (minor - will create a separate issue for that) directory page refreshes itself after each vote
@@ -62,7 +62,7 @@ contract FeaturedVotingContract { | |||
uint256 public cooldownPeriod; | |||
|
|||
Voting[] public votings; | |||
mapping(uint256 => Vote[]) private votesByVotingID; | |||
mapping(uint256 => Vote[]) public votesByVotingID; |
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.
leftover
Peers can vote for more than one community, but they can't vote multiple times for one community? |
Yes, exactly. |
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.
Tested, core functionality works fine 💪
I'll create separate issues for minor stuff as followup.
I gave it a second try and identified one critical issue, although I don't want to block this PR any longer. We should address it in followup. dapp-go-through-2023-06-29_12.29.34-cut-merged-1688043261398.mp4
What I did is: where communityC is "From contract for portal", and communityD is "Contributors' test community"
|
@@ -34,7 +34,7 @@ | |||
"chai": "^4.2.0", | |||
"eslint": "^8.36.0", | |||
"ethers": "5.4.1", | |||
"hardhat": "^2.13.0", | |||
"hardhat": "^2.16.1", |
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.
@osmaczko let's merge it then (I don't have permissions) |