Skip to content

Commit

Permalink
Merge pull request #534 from balancer/build-exit-missing-parameters
Browse files Browse the repository at this point in the history
Adding missing parameters to sdk.pools.buildExitExactBPTIn method;
  • Loading branch information
lgahdl committed Sep 12, 2023
2 parents f4879f0 + 36c5174 commit 812b02e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
7 changes: 6 additions & 1 deletion balancer-js/src/modules/pools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,15 @@ export class Pools implements Findable<PoolWithMethods> {
bptAmount,
userAddress,
slippage,
shouldUnwrapNativeAsset,
singleTokenOut,
}: {
pool: Pool;
bptAmount: string;
userAddress: string;
slippage: string;
shouldUnwrapNativeAsset?: boolean;
singleTokenOut?: string;
}): ExitExactBPTInAttributes {
const concerns = PoolTypeConcerns.from(pool.poolType);
if (!concerns || !concerns.exit.buildExitExactBPTIn)
Expand All @@ -388,7 +392,8 @@ export class Pools implements Findable<PoolWithMethods> {
slippage,
wrappedNativeAsset:
this.networkConfig.addresses.tokens.wrappedNativeAsset.toLowerCase(),
shouldUnwrapNativeAsset: false,
shouldUnwrapNativeAsset: shouldUnwrapNativeAsset ?? false,
singleTokenOut: singleTokenOut ?? undefined,
toInternalBalance: false,
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const { ALCHEMY_URL_POLYGON: jsonRpcUrl } = process.env;
const rpcUrl = 'http://127.0.0.1:8137';
const provider = new ethers.providers.JsonRpcProvider(rpcUrl, network);
const signer = provider.getSigner();
const blockNumber = 46939238;
const blockNumber = 47427007;
let balancer: BalancerSDK;

describe('ComposableStable - recovery', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@ const balPool = {
};

const composableStablePool = {
id: '0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d',
id: '0x4edcb2b46377530bc18bb4d2c7fe46a992c73e100000000000000000000003ec',
poolType: PoolType.ComposableStable,
tokensList: [
'0x2f4eb100552ef93840d5adc30560e5513dfffacb',
'0x82698aecc9e28e9bb27608bd52cf57f704bd1b83',
'0xa13a9247ea42d743238089903570127dda72fe44',
'0xae37d54ae477268b9997d4161b96b8200755935c',
'0x4edcb2b46377530bc18bb4d2c7fe46a992c73e10',
'0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0',
'0xbe9895146f7af43049ca1c1ae358b0541ea49704',
],
};

Expand Down

0 comments on commit 812b02e

Please sign in to comment.