diff --git a/src/components/contextual/pages/pool/PoolMigrationCard/PoolMigrationCard.vue b/src/components/contextual/pages/pool/PoolMigrationCard/PoolMigrationCard.vue index 14b51391c3..78303b75cf 100644 --- a/src/components/contextual/pages/pool/PoolMigrationCard/PoolMigrationCard.vue +++ b/src/components/contextual/pages/pool/PoolMigrationCard/PoolMigrationCard.vue @@ -3,6 +3,7 @@ import useNetwork from '@/composables/useNetwork'; import { deprecatedDetails, gaugeMigrationDetails, + newVersionDetails, } from '@/composables/usePoolHelpers'; import NewPoolData from './NewPoolData.vue'; import usePoolsQuery from '@/composables/queries/usePoolsQuery'; @@ -29,7 +30,10 @@ const { networkSlug } = useNetwork(); const { t } = useI18n(); const migrationInfo = computed( - () => deprecatedDetails(props.poolId) || gaugeMigrationDetails(props.poolId) + () => + deprecatedDetails(props.poolId) || + gaugeMigrationDetails(props.poolId) || + newVersionDetails(props.poolId) ); const newPoolQueryEnabled = computed( diff --git a/src/composables/usePoolHelpers.ts b/src/composables/usePoolHelpers.ts index fdeea2bc1b..6b13bf1ac4 100644 --- a/src/composables/usePoolHelpers.ts +++ b/src/composables/usePoolHelpers.ts @@ -13,7 +13,7 @@ import { } from '@/lib/utils'; import { includesWstEth } from '@/lib/utils/balancer/lido'; import { configService } from '@/services/config/config.service'; -import { DeprecatedDetails } from '@/types/pools'; +import { DeprecatedDetails, NewVersionAvailableDetails } from '@/types/pools'; import { AnyPool, Pool, PoolToken, SubPool } from '@/services/pool/types'; import { hasBalEmissions } from './useAPR'; @@ -580,6 +580,17 @@ export function deprecatedDetails(id: string): DeprecatedDetails | undefined { return POOLS.Deprecated?.[id.toLowerCase()]; } +/** + * Checks if pool ID is included in the list of pools that have a new version available (but are not deprecated yet) + * @param {string} id - The pool ID to check + * @returns {boolean} True if included in list + */ +export function newVersionDetails( + id: string +): NewVersionAvailableDetails | undefined { + return POOLS.NewVersionAvailable?.[id.toLowerCase()]; +} + /** * Checks if pool ID is included in the list of deprecated pools * @param {string} id - The pool ID to check @@ -730,6 +741,10 @@ export function usePoolHelpers(pool: Ref | Ref) { return !!pool.value && !!POOLS.Deprecated?.[pool.value.id]; }); + const isNewPoolAvailable = computed(() => { + return !!pool.value && !!POOLS.NewVersionAvailable?.[pool.value.id]; + }); + return { // computed isStablePool, @@ -750,6 +765,7 @@ export function usePoolHelpers(pool: Ref | Ref) { isMainnetWstETHPool, hasNonApprovedRateProviders, isDeprecatedPool, + isNewPoolAvailable, poolJoinTokens, // methods isStable, diff --git a/src/lib/config/mainnet/pools.ts b/src/lib/config/mainnet/pools.ts index 0f7ef7fddb..eb071c4f03 100644 --- a/src/lib/config/mainnet/pools.ts +++ b/src/lib/config/mainnet/pools.ts @@ -500,6 +500,20 @@ const pools: Pools = { '0x4fd4687ec38220f805b6363c3c1e52d0df3b5023000200000000000000000473', // Euler Boosted USD/wstETH '0x133d241f225750d2c92948e464a5a80111920331000000000000000000000476', // Euler Boosted USD/dola ], + NewVersionAvailable: { + '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080': { + newPool: + '0xe0fcbf4d98f0ad982db260f86cf28b49845403c5000000000000000000000504', + description: 'newVersion.Aave3', + title: 'announcement', + }, + '0x9c6d47ff73e0f5e51be5fd53236e3f595c5793f200020000000000000000042c': { + newPool: + '0x9001cbbd96f54a658ff4e6e65ab564ded76a543100000000000000000000050a', + description: 'newVersion.Aave3', + title: 'announcement', + }, + }, Deprecated: { '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063': {}, '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe': {}, @@ -538,18 +552,6 @@ const pools: Pools = { '0x04248aabca09e9a1a3d5129a7ba05b7f17de768400000000000000000000050e', description: 'deprecatedPool.gaugeKilledReason', }, - '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080': { - newPool: - '0xe0fcbf4d98f0ad982db260f86cf28b49845403c5000000000000000000000504', - description: 'deprecatedPool.newVersion', - title: 'announcement', - }, - '0x9c6d47ff73e0f5e51be5fd53236e3f595c5793f200020000000000000000042c': { - newPool: - '0x9001cbbd96f54a658ff4e6e65ab564ded76a543100000000000000000000050a', - description: 'deprecatedPool.newVersion', - title: 'announcement', - }, }, GaugeMigration: {}, BrandedRedirect: { diff --git a/src/locales/default.json b/src/locales/default.json index fea9a60706..f5132fc492 100644 --- a/src/locales/default.json +++ b/src/locales/default.json @@ -473,8 +473,10 @@ "title": "Move your liquidity for future BAL incentives", "description": "Liquidity mining incentives are being phased out for this pool, since upgraded pools are now live. LPs are encouraged to unstake existing positions, withdraw their liquidity and add it to the newly incentivized pools." }, - "gaugeKilledReason": "This pool's gauge will soon be killed. A new version of this pool has been created that uses Aave v3.", - "newVersion": "A new version of this pool has been created that uses Aave v3" + "gaugeKilledReason": "This pool's gauge will soon be killed. A new version of this pool has been created that uses Aave v3." + }, + "newVersion": { + "Aave3": "A new version of this pool has been created that uses Aave v3" }, "highPriceImpact": "High price impact", "highPriceImpactDetailed": "This swap is significantly moving the market price.", diff --git a/src/pages/pool/_id.vue b/src/pages/pool/_id.vue index 097ac8cc15..41cfeff555 100644 --- a/src/pages/pool/_id.vue +++ b/src/pages/pool/_id.vue @@ -75,6 +75,7 @@ const { isLiquidityBootstrappingPool, isComposableStableLikePool, isDeprecatedPool, + isNewPoolAvailable, } = usePoolHelpers(poolQuery.data); //#endregion @@ -318,7 +319,11 @@ watch( class="pool-locking" /> diff --git a/src/types/pools.ts b/src/types/pools.ts index 1e9ff91ad2..8c4a9fc751 100644 --- a/src/types/pools.ts +++ b/src/types/pools.ts @@ -49,6 +49,8 @@ export type DeprecatedDetails = { title?: string; }; +export type NewVersionAvailableDetails = DeprecatedDetails; + export enum PoolMigrationType { AAVE_BOOSTED_POOL = 'aaveBoostedPool', STABAL3_POOL = 'stabal3Pool', @@ -103,6 +105,7 @@ export type Pools = { ExitViaInternalBalance?: string[]; BrandedRedirect?: Record; Deprecated?: Record; + NewVersionAvailable?: Record; GaugeMigration?: Record; Migrations?: Record; Issues?: Partial>;