Skip to content

Commit f12f9bb

Browse files
authored
Cleanup getUniswapV3Pool docs and internal naming (#2855)
1 parent 82ee42d commit f12f9bb

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

packages/thirdweb/src/exports/extensions/uniswap.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export {
6161
} from "../../extensions/uniswap/__generated__/IUniswapV3Factory/write/setOwner.js";
6262

6363
export {
64-
getUniswapV3Pools as getUniswapV3Pool,
65-
type GetUniswapV3PoolsParams as GetUniswapV3PoolParams,
66-
type GetUniswapV3PoolsResult as GetUniswapV3PoolResult,
64+
getUniswapV3Pool,
65+
type GetUniswapV3PoolParams,
66+
type GetUniswapV3PoolResult,
6767
} from "../../extensions/uniswap/read/getUniswapV3Pools.js";

packages/thirdweb/src/extensions/uniswap/read/getUniswapV3Pools.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import {
66
UNISWAPV3_FACTORY_CONTRACT,
77
WETH_CONTRACT_ADDRESS,
88
} from "~test/test-contracts.js";
9-
import { getUniswapV3Pools } from "./getUniswapV3Pools.js";
9+
import { getUniswapV3Pool } from "./getUniswapV3Pools.js";
1010

1111
describe.runIf(process.env.TW_SECRET_KEY)("uniswap.getUniswapV3Pool", () => {
1212
it("should return the WETH/OHM pool address and fee", async () => {
13-
const pools = await getUniswapV3Pools({
13+
const pools = await getUniswapV3Pool({
1414
contract: UNISWAPV3_FACTORY_CONTRACT,
1515
tokenA: WETH_CONTRACT_ADDRESS,
1616
tokenB: OHM_CONTRACT_ADDRESS,
@@ -30,7 +30,7 @@ describe.runIf(process.env.TW_SECRET_KEY)("uniswap.getUniswapV3Pool", () => {
3030
});
3131

3232
it("should return an empty array when no pool exists for the pair", async () => {
33-
const pools = await getUniswapV3Pools({
33+
const pools = await getUniswapV3Pool({
3434
contract: UNISWAPV3_FACTORY_CONTRACT,
3535
tokenA: MOG_CONTRACT_ADDRESS,
3636
tokenB: OHM_CONTRACT_ADDRESS,

packages/thirdweb/src/extensions/uniswap/read/getUniswapV3Pools.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import { UniswapFee } from "../types.js";
66
/**
77
* Represents the parameters for the `findUniswapV3Pool` function.
88
*/
9-
export type GetUniswapV3PoolsParams = {
9+
export type GetUniswapV3PoolParams = {
1010
tokenA: Address;
1111
tokenB: Address;
1212
};
1313

14-
export type GetUniswapV3PoolsResult = {
14+
export type GetUniswapV3PoolResult = {
1515
poolFee: UniswapFee;
1616
poolAddress: Address;
1717
};
@@ -24,16 +24,16 @@ export type GetUniswapV3PoolsResult = {
2424
* @example
2525
* ```ts
2626
* import { getUniswapV3Pool } from "thirdweb/extensions/uniswap";
27-
* const { poolFee, poolAddress } = await getUniswapV3Pool({
27+
* const pools = await getUniswapV3Pool({
2828
* tokenA: "0x...",
2929
* tokenB: "0x...",
30-
* factoryContract: contract
30+
* contract: factoryContract
3131
* });
3232
* ```
3333
*/
34-
export async function getUniswapV3Pools(
35-
options: BaseTransactionOptions<GetUniswapV3PoolsParams>,
36-
): Promise<GetUniswapV3PoolsResult[]> {
34+
export async function getUniswapV3Pool(
35+
options: BaseTransactionOptions<GetUniswapV3PoolParams>,
36+
): Promise<GetUniswapV3PoolResult[]> {
3737
const { getPool } = await import(
3838
"../__generated__/IUniswapV3Factory/read/getPool.js"
3939
);

0 commit comments

Comments
 (0)