@merkl/api 0.10.288 → 0.10.289
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,22 +38,14 @@ export class ClammPositionFetcher {
|
|
38
38
|
opportunity,
|
39
39
|
tokens: [
|
40
40
|
{
|
41
|
-
token:
|
42
|
-
address: poolData.token0,
|
43
|
-
decimals: poolData.decimalsToken0,
|
44
|
-
symbol: poolData.symbolToken0,
|
45
|
-
},
|
41
|
+
token: opportunity.tokens.filter(t => t.address === poolData.token0)?.[0],
|
46
42
|
breakdown: [
|
47
43
|
{ type: "balance", value: clammPosition.userBalanceToken0 },
|
48
44
|
{ type: "liquidity", value: clammPosition.userInRangeLiquidity },
|
49
45
|
],
|
50
46
|
},
|
51
47
|
{
|
52
|
-
token:
|
53
|
-
address: poolData.token1,
|
54
|
-
decimals: poolData.decimalsToken1,
|
55
|
-
symbol: poolData.symbolToken1,
|
56
|
-
},
|
48
|
+
token: opportunity.tokens.filter(t => t.address === poolData.token1)?.[0],
|
57
49
|
breakdown: [
|
58
50
|
{ type: "balance", value: clammPosition.userBalanceToken1 },
|
59
51
|
{ type: "liquidity", value: clammPosition.userInRangeLiquidity },
|
@@ -4,13 +4,16 @@ import Elysia from "elysia";
|
|
4
4
|
import { CreateRootDto, RootByTimestampsDto } from "./merklRoot.model";
|
5
5
|
import { MerklRootService } from "./merklRoot.service";
|
6
6
|
// ─── Merkl Roots Controller ─────────────────────────────────────────────
|
7
|
-
export const MerklRootController = new Elysia({ prefix: "/roots", detail: { tags: ["Roots"]
|
7
|
+
export const MerklRootController = new Elysia({ prefix: "/roots", detail: { tags: ["Roots"] } })
|
8
8
|
// ─── Get Merkl Root By Timestamp ─────────────────────────────────────
|
9
9
|
.get("/", async ({ query }) => await MerklRootService.rootForTimestamp(query), {
|
10
10
|
query: RootByTimestampsDto,
|
11
11
|
beforeHandle: async ({ query }) => {
|
12
12
|
throwOnUnsupportedChainId(query.chainId);
|
13
13
|
},
|
14
|
+
detail: {
|
15
|
+
description: "Returns the last merkl roots recorded before the provided timestamps",
|
16
|
+
},
|
14
17
|
})
|
15
18
|
// ─── Get all live Merkl Roots ─────────────────────────────────────────
|
16
19
|
.get("/live", async () => await MerklRootService.fetchAll())
|