Let's say I have an account passed in the instruction
#[account(mut), constraint = optional_ata.mint = treasury_ata.mint]
pub optional_ata: Option<Account<'info, TokenAccount>>
Is this method safe to check if optional_ata
was passed in?
// If optional_ata was passed in
if optional_ata.is_some() {....}
IF not, how do I check if optional_ata
was passed in or not using if statement?