Skip to content

Commit 6894f5b

Browse files
committed
fix: imports and types
1 parent d85e146 commit 6894f5b

File tree

2 files changed

+6
-26
lines changed

2 files changed

+6
-26
lines changed

src/test/utils/getTokenInstances.test.ts

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ describe("getTokenInstances", () => {
2626
});
2727

2828
it("should return token instances for valid addresses", async () => {
29-
const addresses: Address[] = [
30-
"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984", // UNI
31-
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
29+
const addresses: [Address, ...Address[]] = [
30+
"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984" as Address, // UNI
31+
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" as Address, // WETH
3232
];
3333

3434
const mockResults = [
@@ -100,19 +100,4 @@ describe("getTokenInstances", () => {
100100

101101
expect(result).toBeNull();
102102
});
103-
104-
it("should handle empty addresses array", async () => {
105-
mockClient.multicall.mockResolvedValueOnce([]);
106-
107-
const result = await getTokenInstances({
108-
addresses: [],
109-
chainId: 1,
110-
});
111-
112-
expect(result).toEqual([]);
113-
expect(mockClient.multicall).toHaveBeenCalledWith({
114-
contracts: [],
115-
allowFailure: false,
116-
});
117-
});
118103
});

src/utils/getPool.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
/**
2-
* @fileoverview Hook to check if a Uniswap V4 pool exists for a given token pair,
3-
* fee tier, tick spacing, and hooks configuration.
4-
*/
5-
61
import { V4PositionManagerAbi } from "@/constants/abis/V4PositionMananger";
7-
import { V4StateViewABI } from "@/constants/abis/V4StateView";
2+
import { V4StateViewAbi } from "@/constants/abis/V4StateView";
83
import { getInstance } from "@/core/uniDevKitV4Factory";
94
import { getTickSpacingForFee } from "@/helpers/fees";
105
import { sortTokens } from "@/helpers/tokens";
@@ -72,13 +67,13 @@ export async function getPool({
7267
},
7368
{
7469
address: sdk.getContractAddress("stateView"),
75-
abi: V4StateViewABI,
70+
abi: V4StateViewAbi,
7671
functionName: "getSlot0",
7772
args: [poolId32Bytes],
7873
},
7974
{
8075
address: sdk.getContractAddress("stateView"),
81-
abi: V4StateViewABI,
76+
abi: V4StateViewAbi,
8277
functionName: "getLiquidity",
8378
args: [poolId32Bytes],
8479
},

0 commit comments

Comments
 (0)