Skip to content

Commit

Permalink
Add cargo feature flag for mainnet wallet check
Browse files Browse the repository at this point in the history
  • Loading branch information
jgur-psyops committed Oct 16, 2024
1 parent 14a0b7b commit af52497
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions programs/marginfi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ devnet = []
mainnet-beta = []
debug = []
staging = []
fee-deploy = []

[dependencies]
solana-program = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
}
Expand Down

0 comments on commit af52497

Please sign in to comment.