Skip to content
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

Improve interface for ImmutableIndividualVotes #232

Open
f-gate opened this issue Sep 28, 2023 · 0 comments
Open

Improve interface for ImmutableIndividualVotes #232

f-gate opened this issue Sep 28, 2023 · 0 comments
Labels
enhancement New feature or request Priority | Medium

Comments

@f-gate
Copy link
Member

f-gate commented Sep 28, 2023

Currently we have implemented the AsRef trait however its not very semantic or readable to get(milestone_key).unwrap().get(account_id) to find a required vote.

Instead implement an interface that allows a caller to ask wether a vote exists. just syntactic sugar really.

fn get_user_vote(milestone_key: MilestoneKey, account_id: AccountIdOf<T>) -> bool;
fn milestone(milestone_key: MilestoneKey) -> BoundedBTreeMap<AccountIdOf<T>, bool, T::MaxContributorsPerProject>
@f-gate f-gate added enhancement New feature or request Priority | Medium labels Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Priority | Medium
Projects
None yet
Development

No branches or pull requests

1 participant