Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update
  • Loading branch information
wangjj9219 committed May 26, 2022
commit 028a2af2b06d2e4d4241ffd8747c8284126f9728
7 changes: 6 additions & 1 deletion modules/aggregated-dex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,12 @@ impl<T: Config> Swap<T::AccountId, Balance, CurrencyId> for TaigaSwap<T> {
T::StableAsset::get_swap_input_amount(pool_id, input_index, output_index, target_amount)
{
if !swap_result.dx.is_zero() && swap_result.dx <= max_supply_amount {
return Some((swap_result.dx, swap_result.dy));
// actually swap by `ExactSupply` limit
return Self::get_swap_amount(
supply_currency_id,
target_currency_id,
SwapLimit::ExactSupply(swap_result.dx, target_amount),
);
}
}
}
Expand Down