fn stake(&mut self) -> PromiseOrValue<BatchId> {
        match self.stake_batch_lock {
            None => self.run_stake_batch().into(),
            Some(StakeLock::Staking) => panic!(BLOCKED_BY_BATCH_RUNNING),
            Some(StakeLock::Staked { .. }) => {
                let batch = self.stake_batch.expect(STAKE_BATCH_SHOULD_EXIST);
                self.process_staked_batch();
                PromiseOrValue::Value(batch.id().into())
            }
            Some(StakeLock::RefreshingStakeTokenValue) => {
                panic!(BLOCKED_BY_STAKE_TOKEN_VALUE_REFRESH)
            }
        }
    }
/// stakes the funds collected within the contract level `StakeBatch`
stakes the funds collected within the contract level `StakeBatch`
stakes the funds collected within the contract level ` StakeBatch `
fn stake(&mut self) -> PromiseOrValue<BatchId> {
        match self.stake_batch_lock {
            None => self.run_stake_batch().into(),
            Some(StakeLock::Staking) => panic!(BLOCKED_BY_BATCH_RUNNING),
            Some(StakeLock::Staked { .. }) => {
                let batch = self.stake_batch.expect(STAKE_BATCH_SHOULD_EXIST);
                self.process_staked_batch();
                PromiseOrValue::Value(batch.id().into())
            }
            Some(StakeLock::RefreshingStakeTokenValue) => {
                panic!(BLOCKED_BY_STAKE_TOKEN_VALUE_REFRESH)
            }
        }
    }
fn stake ( & mut self ) -> PromiseOrValue < BatchId > { match self . stake_batch_lock { None => self . run_stake_batch ( ) . into ( ) , Some ( StakeLock :: Staking ) => panic ! ( BLOCKED_BY_BATCH_RUNNING ) , Some ( StakeLock :: Staked { .. } ) => { let batch = self . stake_batch . expect ( STAKE_BATCH_SHOULD_EXIST ) ; self . process_staked_batch ( ) ; PromiseOrValue :: Value ( batch . id ( ) . into ( ) ) } Some ( StakeLock :: RefreshingStakeTokenValue ) => { panic ! ( BLOCKED_BY_STAKE_TOKEN_VALUE_REFRESH ) } } }
stakes the funds collected within the contract level `StakeBatch`
stakes the funds collected within the contract level ` StakeBatch `
&mut self