Skip to content

Commit

Permalink
allow withdraw to PDA (other than system account)
Browse files Browse the repository at this point in the history
  • Loading branch information
brewmaster012 committed Oct 3, 2024
1 parent 0d81e93 commit 81ffb7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion programs/protocol-contracts-solana/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,9 @@ pub struct Withdraw<'info> {

#[account(mut)]
pub pda: Account<'info, Pda>,
/// CHECK: This is not dangerous because we don't read or write from this account
#[account(mut)]
pub to: SystemAccount<'info>,
pub to: UncheckedAccount<'info>,
}

#[derive(Accounts)]
Expand Down

0 comments on commit 81ffb7c

Please sign in to comment.