pub(crate) async fn check_purse_balance(
        self,
        prestate_hash: Digest,
        main_purse: URef,
    ) -> Option<U512>
    where
        REv: From<ContractRuntimeRequest>,
    {
        let balance_request = BalanceRequest::new(prestate_hash, main_purse);
        match self.get_balance(balance_request).await {
            Ok(balance_result) => {
                if let Some(motes) = balance_result.motes() {
                    return Some(*motes);
                }
                None
            }
            Err(_) => None,
        }
    }
/// Retrieves the balance of a purse, returns `None` if no purse is present.
Retrieves the balance of a purse, returns `None` if no purse is present.
Retrieves the balance of a purse returns ` None ` if no purse is present .
pub(crate) async fn check_purse_balance(
        self,
        prestate_hash: Digest,
        main_purse: URef,
    ) -> Option<U512>
    where
        REv: From<ContractRuntimeRequest>,
    {
        let balance_request = BalanceRequest::new(prestate_hash, main_purse);
        match self.get_balance(balance_request).await {
            Ok(balance_result) => {
                if let Some(motes) = balance_result.motes() {
                    return Some(*motes);
                }
                None
            }
            Err(_) => None,
        }
    }
pub ( crate ) async fn check_purse_balance ( self , prestate_hash : Digest , main_purse : URef , ) -> Option < U512 > where REv : From < ContractRuntimeRequest > , { let balance_request = BalanceRequest :: new ( prestate_hash , main_purse ) ; match self . get_balance ( balance_request ) . await { Ok ( balance_result ) => { if let Some ( motes ) = balance_result . motes ( ) { return Some ( * motes ) ; } None } Err ( _ ) => None , } }
Retrieves the balance of a purse, returns `None` if no purse is present.
Retrieves the balance of a purse returns ` None ` if no purse is present .
self
prestate_hash
Digest
main_purse
URef
self
prestate_hash
Digest
main_purse
URef