Skip to content

Commit

Permalink
fix: Render FX pools like stable pools (#2785)
Browse files Browse the repository at this point in the history
  • Loading branch information
garethfuller authored Feb 9, 2023
1 parent 71f0f7e commit 65924e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/composables/usePool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ export function isComposableStableLike(poolType: PoolType): boolean {
return isStablePhantom(poolType) || isComposableStable(poolType);
}

export function isFx(poolType: PoolType | string): boolean {
return poolType === 'FX';
}

export function isPreMintedBptType(poolType: PoolType): boolean {
// Currently equivalent to isComposableStableLike but will be extended later
// with managed and composable weighted pools.
Expand Down Expand Up @@ -119,7 +123,8 @@ export function isStableLike(poolType: PoolType): boolean {
isStable(poolType) ||
isMetaStable(poolType) ||
isStablePhantom(poolType) ||
isComposableStable(poolType)
isComposableStable(poolType) ||
isFx(poolType)
);
}

Expand Down Expand Up @@ -485,7 +490,8 @@ export function findTokenInTree(
*/
export function isBlocked(pool: Pool, account: string): boolean {
const requiresAllowlisting =
isStableLike(pool.poolType) || isManaged(pool.poolType);
(isStableLike(pool.poolType) && !isFx(pool.poolType)) ||
isManaged(pool.poolType);
const isOwnedByUser =
pool.owner && isAddress(account) && isSameAddress(pool.owner, account);
const isAllowlisted =
Expand Down
1 change: 1 addition & 0 deletions src/locales/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@
"fundPool": "Fund pool",
"fundPoolTooltip": "Add the initial liquidity for this pool.",
"forum": "Forum",
"fx": "FX pool",
"gaugeFilter": {
"gaugeDisplay": "Pool gauge display",
"showExpired": "Show expired pools",
Expand Down

0 comments on commit 65924e7

Please sign in to comment.