Skip to content

Commit e40997e

Browse files
committed
chore: fix typo and add missing extend_instance call
1 parent 857249f commit e40997e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pool/src/contract.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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);

pool/src/emissions/manager.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)