diff --git a/package-lock.json b/package-lock.json index 12987c075c..452ade6ab7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@balancer/frontend-v2", - "version": "1.114.36", + "version": "1.115.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@balancer/frontend-v2", - "version": "1.114.36", + "version": "1.115.0", "license": "MIT", "devDependencies": { "@aave/protocol-js": "^4.3.0", diff --git a/package.json b/package.json index 5bd8aea49c..c1a6c2c149 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@balancer/frontend-v2", - "version": "1.114.36", + "version": "1.115.0", "engines": { "node": "=16", "npm": ">=8" diff --git a/src/lib/config/arbitrum/pools.ts b/src/lib/config/arbitrum/pools.ts index 44e1af897d..53331c36a7 100644 --- a/src/lib/config/arbitrum/pools.ts +++ b/src/lib/config/arbitrum/pools.ts @@ -50,6 +50,10 @@ const pools: Pools = { '0x45c4d1376943ab28802b995acffc04903eb5223f000000000000000000000470', // wstETH-bb-a-WETH '0xc6eee8cb7643ec2f05f46d569e9ec8ef8b41b389000000000000000000000475', // bb-a-USD '0x3fd4954a851ead144c2ff72b1f5a38ea5976bd54000000000000000000000480', // ankreth/wsteth + '0x9cebf13bb702f253abf1579294694a1edad00eaa000000000000000000000486', // bb-a-usdc/bb-a-usdc.e + '0x4a2f6ae7f3e5d715689530873ec35593dc28951b000000000000000000000481', // reth/cbeth/wseth + '0xa8af146d79ac0bb981e4e0d8b788ec5711b1d5d000000000000000000000047b', // dai+/usd+ + '0xd6d20527c7b0669989ee082b9d3a1c63af742290000000000000000000000483', // dola/usd+ ], }, Investment: { @@ -256,6 +260,9 @@ const pools: Pools = { '0xbe0f30217be1e981add883848d0773a86d2d2cd4000000000000000000000471', // rETH-bb-a-WETH '0x45c4d1376943ab28802b995acffc04903eb5223f000000000000000000000470', // wstETH-bb-a-WETH '0xc6eee8cb7643ec2f05f46d569e9ec8ef8b41b389000000000000000000000475', // bb-a-USD + '0xa8af146d79ac0bb981e4e0d8b788ec5711b1d5d000000000000000000000047b', // dai+/usd+ + '0xd6d20527c7b0669989ee082b9d3a1c63af742290000000000000000000000483', // dola/usd+ + '0x9cebf13bb702f253abf1579294694a1edad00eaa000000000000000000000486', // bb-a-usdc/bb-a-usdc.e ], Deprecated: { // '0x178e029173417b1f9c8bc16dcec6f697bc323746000200000000000000000158': { diff --git a/src/services/balancer/pools/exits/handlers/exact-in-exit.handler.ts b/src/services/balancer/pools/exits/handlers/exact-in-exit.handler.ts index 950edf47c2..580e0543ba 100644 --- a/src/services/balancer/pools/exits/handlers/exact-in-exit.handler.ts +++ b/src/services/balancer/pools/exits/handlers/exact-in-exit.handler.ts @@ -59,7 +59,12 @@ export class ExactInExitHandler implements ExitPoolHandler { if (!sdkPool) throw new Error('Failed to find pool: ' + this.pool.value.id); if (!tokenOut) - throw new Error('Could not find exit token in pool tokens list.'); + throw new Error( + 'Could not find exit token in pool tokens list: ' + + amountsOut[0].address + + ' allTokens: ' + + JSON.stringify(Object.keys(tokenInfo)) + ); const isSingleTokenExit = amountsOut.length === 1; const evmBptIn = parseFixed(bptIn, 18).toString(); diff --git a/src/services/balancer/pools/exits/handlers/exact-out-exit.handler.ts b/src/services/balancer/pools/exits/handlers/exact-out-exit.handler.ts index 7950b51f3f..f86f722bc6 100644 --- a/src/services/balancer/pools/exits/handlers/exact-out-exit.handler.ts +++ b/src/services/balancer/pools/exits/handlers/exact-out-exit.handler.ts @@ -50,7 +50,12 @@ export class ExactOutExitHandler implements ExitPoolHandler { if (!sdkPool) throw new Error('Failed to find pool: ' + this.pool.value.id); if (!tokenOut) - throw new Error('Could not find exit token in pool tokens list.'); + throw new Error( + 'Could not find exit token in pool tokens list: ' + + amountsOut[0].address + + ' allTokens: ' + + JSON.stringify(Object.keys(tokenInfo)) + ); const tokenOutAddress = formatAddressForSor(tokenOut.address); const nativeAssetExit = isSameAddress(tokenOutAddress, POOLS.ZeroAddress); diff --git a/src/services/balancer/pools/joins/handlers/swap-join.handler.ts b/src/services/balancer/pools/joins/handlers/swap-join.handler.ts index c818397c08..72fe112be9 100644 --- a/src/services/balancer/pools/joins/handlers/swap-join.handler.ts +++ b/src/services/balancer/pools/joins/handlers/swap-join.handler.ts @@ -3,7 +3,7 @@ import { getTimestampSecondsFromNow } from '@/composables/useTime'; import { POOLS } from '@/constants/pools'; import { NATIVE_ASSET_ADDRESS } from '@/constants/tokens'; import { fetchPoolsForSor, hasFetchedPoolsForSor } from '@/lib/balancer.sdk'; -import { bnum, isSameAddress } from '@/lib/utils'; +import { bnum, isSameAddress, selectByAddress } from '@/lib/utils'; import { Pool } from '@/services/pool/types'; import { BalancerSDK, SwapInfo } from '@balancer-labs/sdk'; import { TransactionResponse } from '@ethersproject/abstract-provider'; @@ -56,7 +56,7 @@ export class SwapJoinHandler implements JoinPoolHandler { throw new Error('Missing amounts to join with.'); const amountIn = amountsIn[0]; - const tokenIn = tokensIn[amountIn.address]; + const tokenIn = selectByAddress(tokensIn, amountIn.address); if (!tokenIn) throw new Error('Missing critical token metadata.'); if (!amountIn.value || bnum(amountIn.value).eq(0)) return { bptOut: '0', priceImpact: 0 };