Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding missing parameters to sdk.pools.buildExitExactBPTIn method; #534

Merged
merged 3 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
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
Loading