Skip to content

Commit b78695b

Browse files
committed
sync new oracle map
1 parent 5a8b7cb commit b78695b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

programs/drift/src/instructions/lp_pool.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ pub fn handle_lp_pool_swap<'c: 'info, 'info>(
336336
in_spot_market.get_max_confidence_interval_multiplier()?,
337337
0,
338338
0,
339+
None,
339340
)?;
340341
let in_oracle = in_oracle.clone();
341342

@@ -349,6 +350,7 @@ pub fn handle_lp_pool_swap<'c: 'info, 'info>(
349350
out_spot_market.get_max_confidence_interval_multiplier()?,
350351
0,
351352
0,
353+
None,
352354
)?;
353355

354356
if !is_oracle_valid_for_action(in_oracle_validity, Some(DriftAction::LpPoolSwap))? {
@@ -559,6 +561,7 @@ pub fn handle_view_lp_pool_swap_fees<'c: 'info, 'info>(
559561
in_spot_market.get_max_confidence_interval_multiplier()?,
560562
0,
561563
0,
564+
None,
562565
)?;
563566
let in_oracle = in_oracle.clone();
564567

@@ -572,6 +575,7 @@ pub fn handle_view_lp_pool_swap_fees<'c: 'info, 'info>(
572575
out_spot_market.get_max_confidence_interval_multiplier()?,
573576
0,
574577
0,
578+
None,
575579
)?;
576580

577581
let in_target_datum = constituent_target_base.get(in_constituent.constituent_index as u32);
@@ -699,6 +703,7 @@ pub fn handle_lp_pool_add_liquidity<'c: 'info, 'info>(
699703
in_spot_market.get_max_confidence_interval_multiplier()?,
700704
0,
701705
0,
706+
None,
702707
)?;
703708
let in_oracle = in_oracle.clone();
704709

@@ -918,6 +923,7 @@ pub fn handle_view_lp_pool_add_liquidity_fees<'c: 'info, 'info>(
918923
in_spot_market.get_max_confidence_interval_multiplier()?,
919924
0,
920925
0,
926+
None,
921927
)?;
922928
let in_oracle = in_oracle.clone();
923929

@@ -1065,6 +1071,7 @@ pub fn handle_lp_pool_remove_liquidity<'c: 'info, 'info>(
10651071
out_spot_market.get_max_confidence_interval_multiplier()?,
10661072
0,
10671073
0,
1074+
None,
10681075
)?;
10691076
let out_oracle = *out_oracle;
10701077

@@ -1320,6 +1327,7 @@ pub fn handle_view_lp_pool_remove_liquidity_fees<'c: 'info, 'info>(
13201327
out_spot_market.get_max_confidence_interval_multiplier()?,
13211328
0,
13221329
0,
1330+
None,
13231331
)?;
13241332
let out_oracle = out_oracle.clone();
13251333

programs/drift/src/state/lp_pool.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ impl LPPool {
738738
spot_market.get_max_confidence_interval_multiplier()?,
739739
0,
740740
0,
741+
None,
741742
)?;
742743
if !is_oracle_valid_for_action(
743744
oracle_and_validity.1,
@@ -1705,6 +1706,7 @@ pub fn update_constituent_target_base_for_derivatives(
17051706
parent_spot_market.get_max_confidence_interval_multiplier()?,
17061707
0,
17071708
0,
1709+
None,
17081710
)?;
17091711
if !is_oracle_valid_for_action(
17101712
parent_oracle_price_and_validity.1,
@@ -1742,6 +1744,7 @@ pub fn update_constituent_target_base_for_derivatives(
17421744
constituent_spot_market.get_max_confidence_interval_multiplier()?,
17431745
0,
17441746
0,
1747+
None,
17451748
)?;
17461749
if !is_oracle_valid_for_action(
17471750
constituent_oracle_price_and_validity.1,

0 commit comments

Comments
 (0)