Function snapps_txn_reference_impl::update_logic::apply_snapp_proved_state_update[][src]

pub fn apply_snapp_proved_state_update<'a>(
    snapp_account: SnappAccount<'a>,
    update: &PartyUpdate<'_>,
    authorization: &PartyAuthorization
) -> SnappAccount<'a>
Expand description

Update the proved_state field of account::SnappAccount with the new computed value.

  • If the authorization is Signature or NoneGiven, and if any_are_set(update.app_state) is true, then set snapp_account.proved_state to false.
  • If the authorization is Proof and all_are_set(update.app_state) is true, then set snapp_account.proved_state to true.
  • Otherwise, leave proved_state unchanged.