wen-community / wen-program-library

Apache License 2.0
90 stars 21 forks source link

Remove unnecessary auth check for execute #48

Closed Aiyualive closed 8 months ago

Aiyualive commented 8 months ago

I simply removed the auth check on the source ata in the execute ix

    #[account(
        token::mint = mint,
        token::authority = owner_delegate, // removed
        token::token_program = anchor_spl::token_interface::spl_token_2022::id(),
    )]
    pub source_account: Box<InterfaceAccount<'info, TokenAccount>>,

The auth is checked anyway in the outer transfer instruction.

Keeping the auth check means we are unable to transfer the NFT using the permanent delegate.