pub(crate) fn internal_deposit(
        &mut self,
        sender_id: &AccountId,
        token_id: &AccountId,
        amount: Balance,
    ) {
        let mut account = self.internal_unwrap_account(sender_id);
        assert!(
            self.whitelisted_tokens.contains(token_id) 
                || account.get_balance(token_id).is_some(),
            "{}",
            ERR12_TOKEN_NOT_WHITELISTED
        );
        account.deposit(token_id, amount);
        self.internal_save_account(&sender_id, account);
    }
/// Record deposit of some number of tokens to this contract.
/// Fails if account is not registered or if token isn't whitelisted.
Record deposit of some number of tokens to this contract.
Fails if account is not registered or if token isn't whitelisted.
Record deposit of some number of tokens to this contract . Fails if account is not registered or if token isn ' t whitelisted .
pub(crate) fn internal_deposit(
        &mut self,
        sender_id: &AccountId,
        token_id: &AccountId,
        amount: Balance,
    ) {
        let mut account = self.internal_unwrap_account(sender_id);
        assert!(
            self.whitelisted_tokens.contains(token_id) 
                || account.get_balance(token_id).is_some(),
            "{}",
            ERR12_TOKEN_NOT_WHITELISTED
        );
        account.deposit(token_id, amount);
        self.internal_save_account(&sender_id, account);
    }
pub ( crate ) fn internal_deposit ( & mut self , sender_id : & AccountId , token_id : & AccountId , amount : Balance , ) { let mut account = self . internal_unwrap_account ( sender_id ) ; assert ! ( self whitelisted_tokens contains ( token_id ) account get_balance ( token_id ) is_some ( ) " " ERR12_TOKEN_NOT_WHITELISTED ) ; account . deposit ( token_id , amount ) ; self . internal_save_account ( & sender_id , account ) ; }
Record deposit of some number of tokens to this contract.
Record deposit of some number of tokens to this contract .
&mut self
sender_id
&AccountId
token_id
&AccountId
amount
Balance
&mut self
sender_id
&AccountId
token_id
&AccountId
amount
Balance