ic-query 0.2.2

Internet Computer query CLI for NNS, SNS, and related public network metadata
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::{labels::ballot_vote_text, timestamp::optional_timestamp_text};
use crate::sns::report::{SnsProposalBallotRow, live::types::SnsGovernanceBallot};

pub(super) fn sns_proposal_ballot_row(
    (neuron_id, ballot): (String, SnsGovernanceBallot),
) -> SnsProposalBallotRow {
    SnsProposalBallotRow {
        neuron_id,
        vote: ballot.vote,
        vote_text: ballot_vote_text(ballot.vote),
        cast_timestamp_seconds: ballot.cast_timestamp_seconds,
        cast_at: optional_timestamp_text(ballot.cast_timestamp_seconds),
        voting_power: ballot.voting_power,
    }
}