File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -3262,12 +3262,20 @@ pub fn handle_update_perp_market_status(
32623262 perp_market_valid( & ctx. accounts. perp_market)
32633263) ]
32643264pub fn handle_update_perp_market_paused_operations (
3265- ctx : Context < AdminUpdatePerpMarket > ,
3265+ ctx : Context < HotAdminUpdatePerpMarket > ,
32663266 paused_operations : u8 ,
32673267) -> Result < ( ) > {
32683268 let perp_market = & mut load_mut ! ( ctx. accounts. perp_market) ?;
32693269 msg ! ( "perp market {}" , perp_market. market_index) ;
32703270
3271+ if * ctx. accounts . admin . key != ctx. accounts . state . admin {
3272+ validate ! (
3273+ paused_operations == PerpOperation :: UpdateFunding as u8 ,
3274+ ErrorCode :: DefaultError ,
3275+ "signer must be admin" ,
3276+ ) ?;
3277+ }
3278+
32713279 perp_market. paused_operations = paused_operations;
32723280
32733281 if perp_market. is_prediction_market ( ) {
@@ -3783,7 +3791,7 @@ pub fn handle_update_amm_jit_intensity(
37833791 perp_market_valid( & ctx. accounts. perp_market)
37843792) ]
37853793pub fn handle_update_perp_market_max_spread (
3786- ctx : Context < AdminUpdatePerpMarket > ,
3794+ ctx : Context < HotAdminUpdatePerpMarket > ,
37873795 max_spread : u32 ,
37883796) -> Result < ( ) > {
37893797 let perp_market = & mut load_mut ! ( ctx. accounts. perp_market) ?;
Original file line number Diff line number Diff line change @@ -1340,7 +1340,7 @@ pub mod drift {
13401340 }
13411341
13421342 pub fn update_perp_market_paused_operations (
1343- ctx : Context < AdminUpdatePerpMarket > ,
1343+ ctx : Context < HotAdminUpdatePerpMarket > ,
13441344 paused_operations : u8 ,
13451345 ) -> Result < ( ) > {
13461346 handle_update_perp_market_paused_operations ( ctx, paused_operations)
@@ -1491,7 +1491,7 @@ pub mod drift {
14911491 }
14921492
14931493 pub fn update_perp_market_max_spread (
1494- ctx : Context < AdminUpdatePerpMarket > ,
1494+ ctx : Context < HotAdminUpdatePerpMarket > ,
14951495 max_spread : u32 ,
14961496 ) -> Result < ( ) > {
14971497 handle_update_perp_market_max_spread ( ctx, max_spread)
You can’t perform that action at this time.
0 commit comments