Skip to content

Commit

Permalink
Add increment of cur_idx in with_simulated_oracle_prices_before funct…
Browse files Browse the repository at this point in the history
…ion (#606)

* Add increment of cur_idx in with_simulated_oracle_prices_before function

* Fix variable declaration in oracle_modules.cairo
  • Loading branch information
0xandee authored Jan 26, 2024
1 parent 567512a commit 571dc67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/oracle/oracle_modules.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,15 @@ fn with_simulated_oracle_prices_before(oracle: IOracleDispatcher, params: Simula
params.primary_tokens.len(), params.primary_prices.len()
);
}
let cur_idx = 0;
let mut cur_idx = 0;
loop {
if (cur_idx == params.primary_tokens.len()) {
break ();
}
let token: ContractAddress = *params.primary_tokens.at(cur_idx);
let price: Price = *params.primary_prices.at(cur_idx);
oracle.set_primary_price(token, price);
cur_idx = cur_idx + 1;
};
}

Expand Down

0 comments on commit 571dc67

Please sign in to comment.