pub(crate) fn internal_register_account(&mut self, account_id: &AccountId, amount: Balance) {

        if let Some(mut farmer) = self.get_farmer_wrapped(&account_id) {
            farmer.get_ref_mut().amount += amount;
            self.data_mut().farmers.insert(&account_id, &farmer);
        } else {
            self.data_mut().farmers.insert(&account_id, &VersionedFarmer::new(account_id.clone(), amount));
            self.data_mut().farmer_count += 1;
        }
    }
/// add balance to user deposited storage balance, if not registered, auto register.
add balance to user deposited storage balance, if not registered, auto register.
add balance to user deposited storage balance if not registered auto register .
pub(crate) fn internal_register_account(&mut self, account_id: &AccountId, amount: Balance) {
        if let Some(mut farmer) = self.get_farmer_wrapped(&account_id) {
            farmer.get_ref_mut().amount += amount;
            self.data_mut().farmers.insert(&account_id, &farmer);
        } else {
            self.data_mut().farmers.insert(&account_id, &VersionedFarmer::new(account_id.clone(), amount));
            self.data_mut().farmer_count += 1;
        }
    }
pub ( crate ) fn internal_register_account ( & mut self , account_id : & AccountId , amount : Balance ) { if let Some ( mut farmer ) = self . get_farmer_wrapped ( & account_id ) { farmer . get_ref_mut ( ) . amount += amount ; self . data_mut ( ) . farmers . insert ( & account_id , & farmer ) ; } else { self . data_mut ( ) . farmers . insert ( & account_id , & VersionedFarmer :: new ( account_id . clone ( ) , amount ) ) ; self . data_mut ( ) . farmer_count += 1 ; } }
add balance to user deposited storage balance, if not registered, auto register.
add balance to user deposited storage balance if not registered auto register .
&mut self
account_id
&AccountId
amount
Balance
&mut self
account_id
&AccountId
amount
Balance