pub(crate) fn internal_lostfound(&mut self, token_id: &AccountId, amount: u128) {
        if self.whitelisted_tokens.contains(token_id) {
            let mut lostfound = self.internal_unwrap_or_default_account(&self.owner_id);
            lostfound.deposit(token_id, amount);
            self.accounts.insert(&self.owner_id, &lostfound.into());
        } else {
            env::panic("ERR: non-whitelisted token can NOT deposit into lost-found.".as_bytes());
        }
        
    }
/// save token to owner account as lostfound, no need to care about storage
/// only global whitelisted token can be stored in lost-found
save token to owner account as lostfound, no need to care about storage
only global whitelisted token can be stored in lost-found
save token to owner account as lostfound no need to care about storage only global whitelisted token can be stored in lost - found
pub(crate) fn internal_lostfound(&mut self, token_id: &AccountId, amount: u128) {
        if self.whitelisted_tokens.contains(token_id) {
            let mut lostfound = self.internal_unwrap_or_default_account(&self.owner_id);
            lostfound.deposit(token_id, amount);
            self.accounts.insert(&self.owner_id, &lostfound.into());
        } else {
            env::panic("ERR: non-whitelisted token can NOT deposit into lost-found.".as_bytes());
        }
    }
pub ( crate ) fn internal_lostfound ( & mut self , token_id : & AccountId , amount : u128 ) { if self . whitelisted_tokens . contains ( token_id ) { let mut lostfound = self . internal_unwrap_or_default_account ( & self . owner_id ) ; lostfound . deposit ( token_id , amount ) ; self . accounts . insert ( & self . owner_id , & lostfound . into ( ) ) ; } else { env :: panic ( " " . as_bytes ( ) ) ; } }
save token to owner account as lostfound, no need to care about storage
only global whitelisted token can be stored in lost-found
save token to owner account as lostfound no need to care about storage only global whitelisted token can be stored in lost - found
&mut self
token_id
&AccountId
amount
u128
&mut self
token_id
&AccountId
amount
u128