Skip to content

Commit

Permalink
fix: add optional feed id for bank creation with seed
Browse files Browse the repository at this point in the history
  • Loading branch information
losman0s committed Aug 12, 2024
1 parent 4dde14f commit 67f7e12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clients/rust/marginfi-cli/src/processor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ pub fn group_add_bank(
bank_mint,
token_program,
oracle_key,
feed_id,
asset_weight_init,
asset_weight_maint,
liability_weight_init,
Expand Down Expand Up @@ -435,6 +436,7 @@ fn create_bank_ix_with_seed(
bank_mint: Pubkey,
token_program: Pubkey,
oracle_key: Pubkey,
feed_id: Option<Pubkey>,
asset_weight_init: WrappedI80F48,
asset_weight_maint: WrappedI80F48,
liability_weight_init: WrappedI80F48,
Expand Down Expand Up @@ -527,7 +529,7 @@ fn create_bank_ix_with_seed(
interest_rate_config,
operational_state: BankOperationalState::Operational,
oracle_setup: oracle_setup.into(),
oracle_keys: create_oracle_key_array(oracle_key),
oracle_keys: create_oracle_key_array(feed_id.unwrap_or(oracle_key)),
risk_tier: risk_tier.into(),
oracle_max_age,
..BankConfig::default()
Expand Down

0 comments on commit 67f7e12

Please sign in to comment.