Skip to content

Commit

Permalink
Add couple comments and remove no longer necessary pub
Browse files Browse the repository at this point in the history
  • Loading branch information
ueco-jb committed Feb 22, 2022
1 parent 0d39caa commit e964d5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/voting-contract/src/ballots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pub struct Ballot {
}

pub struct BallotIndexes<'a> {
// This PrimaryKey allows quering over all proposal ids for given voter address
pub voter: MultiIndex<'a, Addr, Ballot, (u64, Addr)>,
}

Expand Down
3 changes: 2 additions & 1 deletion packages/voting-contract/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub mod ballots;
mod ballots;
mod error;
pub mod msg;
#[cfg(test)]
Expand Down Expand Up @@ -377,6 +377,7 @@ pub fn list_votes_by_voter<Q: CustomQuery>(
limit: usize,
) -> StdResult<VoteListResponse> {
let voter_addr = deps.api.addr_validate(&voter)?;
// PrimaryKey of that IndexMap is (proposal_id, voter_address) -> (u64, Addr)
let start = start_after.map(|m| Bound::exclusive((m, voter_addr.clone())));

let votes: StdResult<Vec<_>> = ballots()
Expand Down

0 comments on commit e964d5c

Please sign in to comment.