@@ -792,7 +792,6 @@ impl Processor {
792792
793793 let rent = Rent :: get ( ) ?;
794794 let stake_history = & StakeHistorySysvar ( clock. epoch ) ;
795- let minimum_delegation = stake:: tools:: get_minimum_delegation ( ) ?;
796795
797796 check_vote_account ( vote_account_info) ?;
798797 check_pool_address ( program_id, vote_account_info. key , pool_info. key ) ?;
@@ -808,6 +807,8 @@ impl Processor {
808807 ) ?;
809808 check_stake_program ( stake_program_info. key ) ?;
810809
810+ let minimum_delegation = stake:: tools:: get_minimum_delegation ( ) ?;
811+
811812 // we expect these numbers to be equal but get them separately in case of future changes
812813 let pool_rent_exempt_reserve = rent. minimum_balance ( pool_stake_info. data_len ( ) ) ;
813814 let onramp_rent_exempt_reserve = rent. minimum_balance ( pool_onramp_info. data_len ( ) ) ;
@@ -1170,7 +1171,6 @@ impl Processor {
11701171
11711172 let rent = & Rent :: get ( ) ?;
11721173 let stake_history = & StakeHistorySysvar ( clock. epoch ) ;
1173- let minimum_delegation = stake:: tools:: get_minimum_delegation ( ) ?;
11741174
11751175 SinglePool :: from_account_info ( pool_info, program_id) ?;
11761176
@@ -1198,6 +1198,8 @@ impl Processor {
11981198 return Err ( SinglePoolError :: InvalidPoolStakeAccountUsage . into ( ) ) ;
11991199 }
12001200
1201+ let minimum_delegation = stake:: tools:: get_minimum_delegation ( ) ?;
1202+
12011203 // tokens for withdraw are determined off the total stakeable value of both pool-owned accounts
12021204 let pre_total_nev = pool_net_asset_value ( pool_stake_info, pool_onramp_info, rent) ;
12031205
0 commit comments