File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
programs/drift/src/instructions Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -1600,10 +1600,10 @@ fn transfer_from_program_vault<'info>(
16001600
16011601 // Execute transfer and sync new balance in the constituent account
16021602 controller:: token:: send_from_program_vault (
1603- & token_program,
1604- & spot_market_vault,
1605- & constituent_token_account,
1606- & drift_signer,
1603+ token_program,
1604+ spot_market_vault,
1605+ constituent_token_account,
1606+ drift_signer,
16071607 state. signer_nonce ,
16081608 amount,
16091609 mint,
@@ -1648,12 +1648,20 @@ fn transfer_from_program_vault<'info>(
16481648 . safe_div ( PRICE_PRECISION_I64 ) ?
16491649 } ;
16501650
1651+ #[ cfg( feature = "mainnet-beta" ) ]
16511652 validate ! (
16521653 balance_diff_notional <= PRICE_PRECISION_I64 / 100 ,
16531654 ErrorCode :: LpInvariantFailed ,
16541655 "Constituent balance mismatch after withdraw from program vault, {}" ,
16551656 balance_diff_notional
16561657 ) ?;
1658+ #[ cfg( not( feature = "mainnet-beta" ) ) ]
1659+ validate ! (
1660+ balance_diff_notional <= PRICE_PRECISION_I64 / 10 ,
1661+ ErrorCode :: LpInvariantFailed ,
1662+ "Constituent balance mismatch after withdraw from program vault, {}" ,
1663+ balance_diff_notional
1664+ ) ?;
16571665
16581666 Ok ( ( ) )
16591667}
You can’t perform that action at this time.
0 commit comments