Skip to content

Commit

Permalink
update BalancerDirectJoinStrategy (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
midnight-commit authored Sep 14, 2023
1 parent 43ae483 commit 85b57da
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ contract BalancerDirectJoinStrategy is BalancerStrategy {
uint256 userDataAmountsIndex;
for (uint256 i = 0; i < amounts.length; i++) {
amounts[i] = poolTokens[i] == balancerPoolTokenIn ? _amountIn : 0;
if (dropBptAmountOnPoolJoin && i != bptIndex) {
userDataAmounts[userDataAmountsIndex] = poolTokens[i] == balancerPoolTokenIn ? _amountIn : 0;
userDataAmountsIndex++;
}
if (dropBptAmountOnPoolJoin && i == bptIndex) continue;
userDataAmounts[userDataAmountsIndex] = poolTokens[i] == balancerPoolTokenIn ? _amountIn : 0;
userDataAmountsIndex++;
}
bytes memory userData = abi.encode(JOIN_KIND, userDataAmounts, 0);

Expand Down

0 comments on commit 85b57da

Please sign in to comment.