File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -3261,12 +3261,20 @@ pub fn handle_update_perp_market_status(
32613261 perp_market_valid( & ctx. accounts. perp_market)
32623262) ]
32633263pub fn handle_update_perp_market_paused_operations (
3264- ctx : Context < AdminUpdatePerpMarket > ,
3264+ ctx : Context < HotAdminUpdatePerpMarket > ,
32653265 paused_operations : u8 ,
32663266) -> Result < ( ) > {
32673267 let perp_market = & mut load_mut ! ( ctx. accounts. perp_market) ?;
32683268 msg ! ( "perp market {}" , perp_market. market_index) ;
32693269
3270+ if * ctx. accounts . admin . key != ctx. accounts . state . admin {
3271+ validate ! (
3272+ paused_operations == PerpOperation :: UpdateFunding as u8 ,
3273+ ErrorCode :: DefaultError ,
3274+ "signer must be admin" ,
3275+ ) ?;
3276+ }
3277+
32703278 perp_market. paused_operations = paused_operations;
32713279
32723280 if perp_market. is_prediction_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)
You can’t perform that action at this time.
0 commit comments