๐ณUpdate Pause Pre Authorization
#[instruction(params: UpdatePausePreAuthorizationParams)] // only for documentation
pub struct UpdatePausePreAuthorization<'info> {
pub owner: Signer<'info>,
#[account(
has_one = owner @ CustomProgramError::PausePreAuthorizationUnauthorized
)]
pub token_account: InterfaceAccount<'info, TokenAccount>,
#[account(
mut,
seeds = [
b"pre-authorization",
token_account.key().as_ref(),
pre_authorization.debit_authority.as_ref(),
],
bump = pre_authorization.bump,
has_one = token_account @ CustomProgramError::PreAuthorizationTokenAccountMismatch,
)]
pub pre_authorization: Account<'info, PreAuthorization>,
}
pub struct UpdatePausePreAuthorizationParams {
pub pause: bool,
}Last updated