// Convenience function for UI's to calculate the withdrawable amount.
Convenience function for UI's to calculate the withdrawable amount.
Convenience function for UI ' s to calculate the withdrawable amount .
pub fn available_for_withdrawal(ctx: Context<AvailableForWithdrawal>) -> Result<()> {
        let available = calculator::available_for_withdrawal(
            &ctx.accounts.vesting,
            ctx.accounts.clock.unix_timestamp,
        );
        // Log as string so that JS can read as a BN.
        msg!(&format!("{{ \"result\": \"{}\" }}", available));
        Ok(())
    }
pub fn available_for_withdrawal ( ctx : Context < AvailableForWithdrawal > ) -> Result < ( ) > { let available = calculator :: available_for_withdrawal ( & ctx . accounts . vesting , ctx . accounts . clock . unix_timestamp , ) ; // Log as string so that JS can read as a BN. msg ! ( format ( " \" \" \" \" " available ) ) ; Ok ( ( ) ) }
Convenience function for UI's to calculate the withdrawable amount.
Convenience function for UI ' s to calculate the withdrawable amount .
ctx
Context<AvailableForWithdrawal>