diff --git a/packages/sdk/src/programs/stable-swap.ts b/packages/sdk/src/programs/stable-swap.ts index d278a3c..b6c6c8e 100644 --- a/packages/sdk/src/programs/stable-swap.ts +++ b/packages/sdk/src/programs/stable-swap.ts @@ -819,6 +819,7 @@ export class StableSwapContext extends WalletCont .execStrategy(rampStep, rampDuration) .accountsStrict({ strategy: address, + owner: pool.ownerAddress, pool: pool.address, }) .instruction(); diff --git a/programs/stable-swap/src/instructions/shutdown.rs b/programs/stable-swap/src/instructions/shutdown.rs index b63e43d..f5d8963 100644 --- a/programs/stable-swap/src/instructions/shutdown.rs +++ b/programs/stable-swap/src/instructions/shutdown.rs @@ -48,9 +48,8 @@ pub fn process_shutdown<'a, 'b, 'c, 'info>(ctx: Context<'_, '_, 'info, 'info, Sh #[derive(Accounts)] pub struct Shutdown<'info> { - /// CHECK: OK #[account(mut)] - pub owner: UncheckedAccount<'info>, + pub owner: Signer<'info>, #[account(mut, close = owner, has_one = owner)] pub pool: Account<'info, Pool>, diff --git a/programs/stable-swap/src/instructions/strategy.rs b/programs/stable-swap/src/instructions/strategy.rs index b5378df..c4834e4 100644 --- a/programs/stable-swap/src/instructions/strategy.rs +++ b/programs/stable-swap/src/instructions/strategy.rs @@ -108,6 +108,8 @@ pub struct ExecStrategy<'info> { #[account(has_one = pool)] pub strategy: Account<'info, Strategy>, - #[account(mut)] + pub owner: Signer<'info>, + + #[account(mut, has_one = owner)] pub pool: Account<'info, Pool>, } diff --git a/programs/weighted-swap/src/instructions/shutdown.rs b/programs/weighted-swap/src/instructions/shutdown.rs index dbb2229..3d74ba4 100644 --- a/programs/weighted-swap/src/instructions/shutdown.rs +++ b/programs/weighted-swap/src/instructions/shutdown.rs @@ -47,9 +47,8 @@ pub fn process_shutdown<'a, 'b, 'c, 'info>(ctx: Context<'_, '_, 'info, 'info, Sh #[derive(Accounts)] pub struct Shutdown<'info> { - /// CHECK: OK #[account(mut)] - pub owner: UncheckedAccount<'info>, + pub owner: Signer<'info>, #[account(mut, close = owner, has_one = owner)] pub pool: Account<'info, Pool>,