Skip to content

Commit

Permalink
Rename proportional exit on ComposableStable encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoguerios committed Nov 9, 2023
1 parent 9f5605d commit 9134964
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion balancer-js/src/modules/exits/exits.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ export class Exit {
userData = WeightedPoolEncoder.exitExactBPTInForTokensOut(amountIn);
} else if (node.type === PoolType.ComposableStable) {
userData =
ComposableStablePoolEncoder.exitExactBPTInForAllTokensOut(amountIn);
ComposableStablePoolEncoder.exitExactBPTInForTokensOut(amountIn);
} else {
// TODO: double check if it's ok to set the Stable Pool Encoder as the default/else case
userData = StablePoolEncoder.exitExactBPTInForTokensOut(amountIn);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class ComposableStablePoolExit implements ExitConcern {
bptIn,
sortedValues.singleTokenOutIndexWithoutBpt
)
: ComposableStablePoolEncoder.exitExactBPTInForAllTokensOut(bptIn);
: ComposableStablePoolEncoder.exitExactBPTInForTokensOut(bptIn);

// MinAmounts needs a value for BPT for encoding
const minAmountsOutWithBpt = insert(
Expand Down
2 changes: 1 addition & 1 deletion balancer-js/src/modules/relayer/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const exit = (
);
} else {
const encoder = isComposable
? ComposableStablePoolEncoder.exitExactBPTInForAllTokensOut
? ComposableStablePoolEncoder.exitExactBPTInForTokensOut
: StablePoolEncoder.exitExactBPTInForTokensOut;
userData = encoder(amount);
}
Expand Down
2 changes: 1 addition & 1 deletion balancer-js/src/pool-composable-stable/encoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class ComposableStablePoolEncoder {
* Encodes the userData parameter for exiting a StablePool by removing tokens in return for an exact amount of BPT
* @param bptAmountIn - the amount of BPT to be burned
*/
static exitExactBPTInForAllTokensOut = (bptAmountIn: BigNumberish): string =>
static exitExactBPTInForTokensOut = (bptAmountIn: BigNumberish): string =>
defaultAbiCoder.encode(
['uint256', 'uint256'],
[
Expand Down

0 comments on commit 9134964

Please sign in to comment.