File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -428,6 +428,8 @@ impl Pool for PoolContract {
428428 }
429429
430430 fn set_reserve ( e : Env , asset : Address ) -> u32 {
431+ storage:: extend_instance ( & e) ;
432+
431433 let index = pool:: execute_set_reserve ( & e, & asset) ;
432434
433435 PoolEvents :: set_reserve ( & e, asset, index) ;
Original file line number Diff line number Diff line change @@ -136,12 +136,12 @@ fn update_reserve_emission_eps(
136136 }
137137 // determine the amount of tokens not emitted from the last config
138138 if emission_data. expiration > e. ledger ( ) . timestamp ( ) {
139- let time_left_tell_exp = emission_data. expiration - e. ledger ( ) . timestamp ( ) ;
139+ let time_left_till_exp = emission_data. expiration - e. ledger ( ) . timestamp ( ) ;
140140
141141 // Eps is scaled by 14 decimals
142- let tokens_to_emit_tell_exp =
143- i128 ( emission_data. eps ) . fixed_mul_floor ( e, & i128 ( time_left_tell_exp ) , & SCALAR_7 ) ;
144- tokens_left_to_emit += tokens_to_emit_tell_exp ;
142+ let tokens_to_emit_till_exp =
143+ i128 ( emission_data. eps ) . fixed_mul_floor ( e, & i128 ( time_left_till_exp ) , & SCALAR_7 ) ;
144+ tokens_left_to_emit += tokens_to_emit_till_exp ;
145145 }
146146
147147 let eps = u64 ( tokens_left_to_emit * SCALAR_7 / ( 7 * 24 * 60 * 60 ) ) . unwrap_optimized ( ) ;
You can’t perform that action at this time.
0 commit comments