Skip to content

Commit

Permalink
fix pools page
Browse files Browse the repository at this point in the history
  • Loading branch information
totop716 committed Jun 29, 2023
1 parent f66f507 commit 769bc80
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
8 changes: 7 additions & 1 deletion src/lib/src/trade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,13 @@ export class Trade<
const poolAddressSet = new Set<string>();
for (const { route } of routes) {
for (const pool of route.pools) {
poolAddressSet.add(Pool.getAddress(pool.token0, pool.token1, pool.fee));
poolAddressSet.add(
Pool.getAddress(
pool.token0,
pool.token1,
pool.isUni ? pool.fee : undefined,
),
);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const AnalyticsPairLiquidityChartV3: React.FC<{
t.liquidityActive,
t.tickIdx,
mockTicks,
false,
isUni,
)
: undefined;
const nextSqrtX96 = liquidityChartData.ticksProcessed[i - 1]
Expand Down
2 changes: 1 addition & 1 deletion src/pages/PoolsPage/v3/MigrateV2DetailsPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ export default function MigrateV2DetailsPage() {
new Pool(
token0,
token1,
FeeAmount.LOW,
undefined,
sqrtPrice,
0,
tick,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ export function SelectRange({
onRightRangeInput={onRightRangeInput}
interactive={false}
priceFormat={priceFormat}
feeAmount={mintInfo.feeAmount}
/>
</Box>
</Box>
Expand Down
8 changes: 7 additions & 1 deletion src/v3lib/entities/trade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,13 @@ export class Trade<
const poolAddressSet = new Set<string>();
for (const { route } of routes) {
for (const pool of route.pools) {
poolAddressSet.add(Pool.getAddress(pool.token0, pool.token1, pool.fee));
poolAddressSet.add(
Pool.getAddress(
pool.token0,
pool.token1,
pool.isUni ? pool.fee : undefined,
),
);
}
}

Expand Down

0 comments on commit 769bc80

Please sign in to comment.