File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
programs/drift/src/instructions Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -3334,6 +3334,12 @@ pub fn handle_settle_perp_to_lp_pool<'c: 'info, 'info>(
33343334 let lp_pool_key = ctx. accounts . lp_pool . key ( ) ;
33353335 let mut lp_pool = ctx. accounts . lp_pool . load_mut ( ) ?;
33363336
3337+ controller:: spot_balance:: update_spot_market_cumulative_interest (
3338+ & mut * quote_market,
3339+ None ,
3340+ now,
3341+ ) ?;
3342+
33373343 let tvl_before = quote_market
33383344 . get_tvl ( ) ?
33393345 . safe_add ( quote_constituent. vault_token_balance as u128 ) ?;
@@ -3351,12 +3357,6 @@ pub fn handle_settle_perp_to_lp_pool<'c: 'info, 'info>(
33513357 None ,
33523358 ) ?;
33533359
3354- controller:: spot_balance:: update_spot_market_cumulative_interest (
3355- & mut * quote_market,
3356- None ,
3357- now,
3358- ) ?;
3359-
33603360 for ( _, perp_market_loader) in perp_market_map. 0 . iter ( ) {
33613361 let mut perp_market = perp_market_loader. load_mut ( ) ?;
33623362 if lp_pool. lp_pool_id != perp_market. lp_pool_id {
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ use std::ops::DerefMut;
33
44use anchor_lang:: prelude:: * ;
55use anchor_lang:: Discriminator ;
6+ use anchor_spl:: associated_token:: AssociatedToken ;
67use anchor_spl:: {
78 token:: Token ,
89 token_2022:: Token2022 ,
@@ -3681,6 +3682,7 @@ pub fn handle_begin_swap<'c: 'info, 'info>(
36813682 } else {
36823683 let mut whitelisted_programs = WHITELISTED_SWAP_PROGRAMS . to_vec ( ) ;
36833684 if !delegate_is_signer {
3685+ whitelisted_programs. push ( AssociatedToken :: id ( ) ) ;
36843686 whitelisted_programs. push ( Token :: id ( ) ) ;
36853687 whitelisted_programs. push ( Token2022 :: id ( ) ) ;
36863688 whitelisted_programs. push ( marinade_mainnet:: ID ) ;
You can’t perform that action at this time.
0 commit comments