From 605b695bb51d439c6adda21040e5a9ce08a55cc7 Mon Sep 17 00:00:00 2001 From: brewmaster012 <88689859+brewmaster012@users.noreply.github.com> Date: Thu, 3 Oct 2024 12:29:53 -0500 Subject: [PATCH] allow withdraw to PDA (other than system account) --- programs/protocol-contracts-solana/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/protocol-contracts-solana/src/lib.rs b/programs/protocol-contracts-solana/src/lib.rs index d49454e..2f486a9 100644 --- a/programs/protocol-contracts-solana/src/lib.rs +++ b/programs/protocol-contracts-solana/src/lib.rs @@ -350,8 +350,9 @@ pub struct Withdraw<'info> { #[account(mut)] pub pda: Account<'info, Pda>, + /// CHECK: to account is not read so it's not dangerous #[account(mut)] - pub to: SystemAccount<'info>, + pub to: UncheckedAccount<'info>, } #[derive(Accounts)]