/// Returns whether a proposal has been executed or failed.
Returns whether a proposal has been executed or failed.
Returns whether a proposal has been executed or failed .
pub async fn is_proposal_executed_or_failed(
    governance_canister: &Canister<'_>,
    id: ProposalId,
) -> bool {
    let pi: Option<ProposalInfo> = governance_canister
        .query_("get_proposal_info", candid, (id,))
        .await
        .unwrap();
    let pi = pi.expect("Proposal with id: {:?} not found.");
    println!("Proposal {:?} status: {:?}", id, pi.status());
    pi.status() == ProposalStatus::Executed
        || pi.status() == ProposalStatus::Failed
        || pi.status() == ProposalStatus::Rejected
}
pub async fn is_proposal_executed_or_failed ( governance_canister : & Canister < ' _ > , id : ProposalId , ) -> bool { let pi : Option < ProposalInfo > = governance_canister . query_ ( " " , candid , ( id , ) ) . await . unwrap ( ) ; let pi = pi . expect ( " " ) ; println ! ( " " id pi status ( ) ) ; pi . status ( ) == ProposalStatus :: Executed || pi . status ( ) == ProposalStatus :: Failed || pi . status ( ) == ProposalStatus :: Rejected }
Returns whether a proposal has been executed or failed.
Returns whether a proposal has been executed or failed .
governance_canister
&Canister<'_>
id
ProposalId