Skip to content

Commit

Permalink
Update amm/contracts/router_v2/lib.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Grzegorz Gawryał <[email protected]>
  • Loading branch information
JanKuczma and ggawryal authored Sep 4, 2024
1 parent a3be0c5 commit 5b9ca04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions amm/contracts/router_v2/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ pub mod router_v2 {
token_out: AccountId,
) -> Result<Vec<u128>, RouterV2Error> {
let mut amounts = vec![0; valid_path.len() + 1];
amounts[valid_path.len() - 1] = amount_out;
amounts[valid_path.len() - 2] = valid_path[valid_path.len() - 2].pool.get_amount_in(
valid_path[valid_path.len() - 2].token_in,
amounts[valid_path.len()] = amount_out;
amounts[valid_path.len() - 1] = valid_path[valid_path.len() - 1].pool.get_amount_in(
valid_path[valid_path.len() - 1].token_in,
token_out,
amount_out,
)?;
Expand Down

0 comments on commit 5b9ca04

Please sign in to comment.