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

Distinguish between weight 0 and not member in cw3 queries #154

Closed
ethanfrey opened this issue Dec 4, 2020 · 3 comments · Fixed by #158 or #159
Closed

Distinguish between weight 0 and not member in cw3 queries #154

ethanfrey opened this issue Dec 4, 2020 · 3 comments · Fixed by #158 or #159
Assignees

Comments

@ethanfrey
Copy link
Member

Cw3QueryMsg::Voter{addr: HumanAddr} should return something like cw4::MemberResponse, eg:

pub struct VoterInfo {
  pub weight: Option<u64>,
}

Do not change the VoterListResponse return info.

@maurolacy
Copy link
Contributor

maurolacy commented Dec 7, 2020

Do not change the VoterListResponse return info.

Hmm, I see now that I missed that restriction. In any case, re-open and I'll revisit this: basically, by using two different (sub)structs for VoterResponse and VoterListResponse.

@ethanfrey ethanfrey reopened this Dec 7, 2020
Contract development automation moved this from Done to In progress Dec 7, 2020
@ethanfrey
Copy link
Member Author

I missed that too just looking at the diff.

The member list always has a value, to avoid needless unwraps

@maurolacy
Copy link
Contributor

Take a look at #159, and sorry for the confusion.

Contract development automation moved this from In progress to Done Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants