pub(crate) fn move_to_clear(&mut self, total_seeds: &Balance) -> bool {
        if let SimpleFarmStatus::Running = self.status {
            self.distribute(total_seeds, true);
        }
        if let SimpleFarmStatus::Ended = self.status {
            if self.last_distribution.unclaimed > 0 {
                self.amount_of_claimed += self.last_distribution.unclaimed;
                self.amount_of_beneficiary += self.last_distribution.unclaimed;
                self.last_distribution.unclaimed = 0;
            }
            self.status = SimpleFarmStatus::Cleared;
            true
        } else {
            false
        }
    }
/// Move an Ended farm to Cleared, if any unclaimed reward exists, go to beneficiary
Move an Ended farm to Cleared, if any unclaimed reward exists, go to beneficiary
Move an Ended farm to Cleared if any unclaimed reward exists go to beneficiary
pub(crate) fn move_to_clear(&mut self, total_seeds: &Balance) -> bool {
        if let SimpleFarmStatus::Running = self.status {
            self.distribute(total_seeds, true);
        }
        if let SimpleFarmStatus::Ended = self.status {
            if self.last_distribution.unclaimed > 0 {
                self.amount_of_claimed += self.last_distribution.unclaimed;
                self.amount_of_beneficiary += self.last_distribution.unclaimed;
                self.last_distribution.unclaimed = 0;
            }
            self.status = SimpleFarmStatus::Cleared;
            true
        } else {
            false
        }
    }
pub ( crate ) fn move_to_clear ( & mut self , total_seeds : & Balance ) -> bool { if let SimpleFarmStatus :: Running = self . status { self . distribute ( total_seeds , true ) ; } if let SimpleFarmStatus :: Ended = self . status { if self . last_distribution . unclaimed > 0 { self . amount_of_claimed += self . last_distribution . unclaimed ; self . amount_of_beneficiary += self . last_distribution . unclaimed ; self . last_distribution . unclaimed = 0 ; } self . status = SimpleFarmStatus :: Cleared ; true } else { false } }
Move an Ended farm to Cleared, if any unclaimed reward exists, go to beneficiary
Move an Ended farm to Cleared if any unclaimed reward exists go to beneficiary
&mut self
total_seeds
&Balance
&mut self
total_seeds
&Balance