pub(crate) fn deposit(&mut self, token: &AccountId, amount: Balance) {
        if let Some(x) = self.legacy_tokens.remove(token) {
            // need convert to tokens
            self.tokens.insert(token, &(amount + x));
        } else if let Some(x) = self.tokens.get(token) {
            self.tokens.insert(token, &(amount + x));
        } else {
            self.tokens.insert(token, &amount);
        }
    }
/// Deposit amount to the balance of given token.
Deposit amount to the balance of given token.
Deposit amount to the balance of given token .
pub(crate) fn deposit(&mut self, token: &AccountId, amount: Balance) {
        if let Some(x) = self.legacy_tokens.remove(token) {
            // need convert to tokens
            self.tokens.insert(token, &(amount + x));
        } else if let Some(x) = self.tokens.get(token) {
            self.tokens.insert(token, &(amount + x));
        } else {
            self.tokens.insert(token, &amount);
        }
    }
pub ( crate ) fn deposit ( & mut self , token : & AccountId , amount : Balance ) { if let Some ( x ) = self . legacy_tokens . remove ( token ) { // need convert to tokens self . tokens . insert ( token , & ( amount + x ) ) ; } else if let Some ( x ) = self . tokens . get ( token ) { self . tokens . insert ( token , & ( amount + x ) ) ; } else { self . tokens . insert ( token , & amount ) ; } }
Deposit amount to the balance of given token.
Deposit amount to the balance of given token .
&mut self
token
&AccountId
amount
Balance
&mut self
token
&AccountId
amount
Balance