Fix prices function

This commit is contained in:
Louise Poole
2024-04-15 17:41:16 +01:00
parent 306293764c
commit 45dc7aa457
2 changed files with 3 additions and 2 deletions

View File

@@ -106,6 +106,7 @@ contract BalancerV2SwapAdapter is ISwapAdapter {
address buyToken,
uint256[] memory specifiedAmounts
) external returns (Fraction[] memory calculatedPrices) {
calculatedPrices = new Fraction[](specifiedAmounts.length);
for (uint256 i = 0; i < specifiedAmounts.length; i++) {
calculatedPrices[i] =
priceSingle(poolId, sellToken, buyToken, specifiedAmounts[i]);