diff --git a/programs/marginfi/Cargo.toml b/programs/marginfi/Cargo.toml index bd5feb6f7..895e67ae4 100644 --- a/programs/marginfi/Cargo.toml +++ b/programs/marginfi/Cargo.toml @@ -22,6 +22,7 @@ devnet = [] mainnet-beta = [] debug = [] staging = [] +fee-deploy = [] [dependencies] solana-program = { workspace = true } diff --git a/programs/marginfi/src/instructions/marginfi_group/init_global_fee_state.rs b/programs/marginfi/src/instructions/marginfi_group/init_global_fee_state.rs index 6572f7873..ec47a0a21 100644 --- a/programs/marginfi/src/instructions/marginfi_group/init_global_fee_state.rs +++ b/programs/marginfi/src/instructions/marginfi_group/init_global_fee_state.rs @@ -15,9 +15,8 @@ pub fn initialize_fee_state( program_fee_rate: WrappedI80F48, ) -> Result<()> { let mut fee_state = ctx.accounts.fee_state.load_init()?; - // On mainnet we always use the mrgn program multisig. On other networks, configurable. cfg_if::cfg_if! { - if #[cfg(feature = "mainnet-beta")] { + if #[cfg(all(feature = "mainnet-beta", feature = "fee-deploy"))] { if ctx.accounts.payer.key != &pubkey!("3HGdGLrnK9DsnHi1mCrUMLGfQHcu6xUrXhMY14GYjqvM"){ panic!("The mrgn program multisig must sign on mainnet.") }