PerpEditMarket: Fix permission for oracle change (#420)

This commit is contained in:
Christian Kamm 2023-01-24 10:03:10 +01:00 committed by GitHub
parent 629eaafaf3
commit eb079e1f4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -65,6 +65,7 @@ pub fn perp_edit_market(
};
if let Some(oracle) = oracle_opt {
perp_market.oracle = oracle;
require_group_admin = true;
}
if reset_stable_price {
require_keys_eq!(perp_market.oracle, ctx.accounts.oracle.key());