pub fn unstake(
        &self,
        signer: &dyn Signer,
        farm_name: &str,
        ui_amount: f64,
    ) -> Result<Signature, FarmClientError> {
        let mut inst = Vec::<Instruction>::new();
        let mut signers = Vec::<Box<dyn Signer>>::new();
        let _ = self.check_farm_accounts(signer, farm_name, 0.0, &mut inst, &mut signers)?;
        inst.push(self.new_instruction_unstake(&signer.pubkey(), farm_name, ui_amount)?);

        let mut unboxed_signers: Vec<&dyn Signer> = vec![signer];
        unboxed_signers.append(&mut signers.iter().map(|x| x.as_ref()).collect());
        self.sign_and_send_instructions(&unboxed_signers, inst.as_slice())
    }
/// Unstakes tokens from the Farm.
/// If the amount is set to zero entire balance will be unstaked.
Unstakes tokens from the Farm.
If the amount is set to zero entire balance will be unstaked.
Unstakes tokens from the Farm . If the amount is set to zero entire balance will be unstaked .
pub fn unstake(
        &self,
        signer: &dyn Signer,
        farm_name: &str,
        ui_amount: f64,
    ) -> Result<Signature, FarmClientError> {
        let mut inst = Vec::<Instruction>::new();
        let mut signers = Vec::<Box<dyn Signer>>::new();
        let _ = self.check_farm_accounts(signer, farm_name, 0.0, &mut inst, &mut signers)?;
        inst.push(self.new_instruction_unstake(&signer.pubkey(), farm_name, ui_amount)?);
        let mut unboxed_signers: Vec<&dyn Signer> = vec![signer];
        unboxed_signers.append(&mut signers.iter().map(|x| x.as_ref()).collect());
        self.sign_and_send_instructions(&unboxed_signers, inst.as_slice())
    }
pub fn unstake ( & self , signer : & dyn Signer , farm_name : & str , ui_amount : f64 , ) -> Result < Signature , FarmClientError > { let mut inst = Vec :: < Instruction > :: new ( ) ; let mut signers = Vec :: < Box < dyn Signer > > :: new ( ) ; let _ = self . check_farm_accounts ( signer , farm_name , 0.0 , & mut inst , & mut signers ) ? ; inst . push ( self . new_instruction_unstake ( & signer . pubkey ( ) , farm_name , ui_amount ) ? ) ; let mut unboxed_signers : Vec < & dyn Signer > = vec ! [ signer ] ; unboxed_signers . append ( & mut signers . iter ( ) . map ( | x | x . as_ref ( ) ) . collect ( ) ) ; self . sign_and_send_instructions ( & unboxed_signers , inst . as_slice ( ) ) }
Unstakes tokens from the Farm.
Unstakes tokens from the Farm .
&self
signer
&dyn Signer
farm_name
&str
ui_amount
f64
&self
signer
&dyn Signer
farm_name
&str
ui_amount
f64