Skip to content

Commit ea51667

Browse files
github-actions[bot]damjankuznar
authored andcommitted
feat(api): add displayName and keywords to perpAnnotation
1 parent d2b0977 commit ea51667

4 files changed

Lines changed: 28 additions & 1 deletion

File tree

‎docs/SUMMARY.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,17 @@
391391
kind: openapi
392392
spec: hl-info-outcomeMeta
393393
```
394+
- ```yaml
395+
type: builtin:openapi
396+
props:
397+
models: false
398+
downloadLink: false
399+
dependencies:
400+
spec:
401+
ref:
402+
kind: openapi
403+
spec: hl-info-perpAnnotation
404+
```
394405
- ```yaml
395406
type: builtin:openapi
396407
props:

‎src/api/exchange/_methods/perpDeploy.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ export const PerpDeployRequest = /* @__PURE__ */ (() => {
200200
category: v.string(),
201201
/** Detailed description (max 400 characters). */
202202
description: v.string(),
203+
/** Display name for frontends to use instead of the L1 name, or null to ignore. */
204+
displayName: v.nullable(v.string()),
205+
/** Keywords used as hints to match against searches. */
206+
keywords: v.array(v.string()),
203207
}),
204208
}),
205209
]),

‎src/api/info/_methods/perpAnnotation.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ export type PerpAnnotationResponse = {
2727
category: string;
2828
/** Human-readable description of the category. */
2929
description: string;
30+
/** Display name for frontends to use instead of the L1 name. */
31+
displayName?: string;
32+
/** Keywords used as hints to match against searches. */
33+
keywords?: string[];
3034
} | null;
3135

3236
// ============================================================

‎tests/api/exchange/perpDeploy.test.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,15 @@ runTest({
148148
{ setMarginModes: [["TEST0", "noCross"], ["TEST1", "strictIsolated"]] },
149149
{ setFeeScale: { dex: "test", scale: "2.5" } },
150150
{ setGrowthModes: [["TEST0", true]] },
151-
{ setPerpAnnotation: { coin: "TEST0", category: "other", description: "other perps" } },
151+
{
152+
setPerpAnnotation: {
153+
coin: "TEST0",
154+
category: "other",
155+
description: "other perps",
156+
displayName: null,
157+
keywords: [],
158+
},
159+
},
152160
];
153161

154162
await Promise.all(params.map((p) =>

0 commit comments

Comments
 (0)