From 92fcfceac60ddae79b458923ccedd25fb0821500 Mon Sep 17 00:00:00 2001 From: diciaup Date: Tue, 7 May 2024 19:44:01 +0200 Subject: [PATCH] fix: expose LivePool object --- package.json | 2 +- src/index.ts | 1 + src/social/SocialAPI.ts | 1 - tests/e2e/SocialAPI.test.ts | 5 +++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index f4ded3b..18dc09f 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "engineStrict": true, "scripts": { "test": "vitest ./tests/unit", - "e2e": "vitest ./tests/e2e/LivePool.test.ts", + "e2e": "vitest ./tests/e2e/SocialAPI.test.ts", "audit": "yarn audit --groups dependencies", "format": "prettier --write src/**/*.ts", "lint": "eslint './src/**/*.ts'", diff --git a/src/index.ts b/src/index.ts index 3a518dd..fa8938f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -22,6 +22,7 @@ export * from "./coin/PoolApi"; export * from "./coin/schemas/pools-schema"; export * from "./live/LiveCLMM"; +export * from "./live/LivePool"; export * from "./live/types"; export * from "./live/utils/getCoins"; export * from "./live/utils/mergeCoins"; diff --git a/src/social/SocialAPI.ts b/src/social/SocialAPI.ts index 9a7ff9b..935b87e 100644 --- a/src/social/SocialAPI.ts +++ b/src/social/SocialAPI.ts @@ -22,7 +22,6 @@ export class SocialAPI { getThreads(params: QueryThreadsParams): Promise { const queryParams = new URLSearchParams(queryThreadsParams.parse(params) as Record); - console.warn("query params", queryParams); return jsonFetch(`${this.url}/threads?${queryParams}`, { method: "GET", }); diff --git a/tests/e2e/SocialAPI.test.ts b/tests/e2e/SocialAPI.test.ts index ee98da9..7d0edc3 100644 --- a/tests/e2e/SocialAPI.test.ts +++ b/tests/e2e/SocialAPI.test.ts @@ -32,13 +32,14 @@ describe("Social APIs", () => { coin = createdCoin; }); - test("Create Thread", async () => { + test("Social APIs flow", async () => { const socialAPI = new SocialAPI(BE_URL); await socialAPI.createThread({ message: "Test message", coinType: coin.type, }); const { result } = await socialAPI.getThreads({ coinType: coin.type }); - expect(result.find((r) => r.creator === keypair.getPublicKey().toSuiAddress())).toBeTruthy(); + const thread = result.find((r) => r.creator === keypair.getPublicKey().toSuiAddress()); + expect(thread).toBeTruthy(); }); });