Skip to content

Commit 7ada0ff

Browse files
committed
feat: pass currencyHyperliquidSymbol as additional data
1 parent eeef856 commit 7ada0ff

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/api/requests/withdrawals/v1.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ const Schema = {
6666
description:
6767
"Signature attesting the owner authorized this particular withdrawal request",
6868
}),
69-
submitWithdrawalRequestParams: Type.Optional(SubmitWithdrawalRequestParamsSchema),
69+
submitWithdrawalRequestParams: Type.Optional(
70+
SubmitWithdrawalRequestParamsSchema
71+
),
7072
additionalData: Type.Optional(
7173
Type.Object(
7274
{
@@ -107,6 +109,13 @@ const Schema = {
107109
}),
108110
})
109111
),
112+
"hyperliquid-vm": Type.Optional(
113+
Type.Object({
114+
currencyHyperliquidSymbol: Type.String({
115+
description: "The Hyperliquid symbol of the currency",
116+
}),
117+
})
118+
),
110119
},
111120
{
112121
description:

src/services/request-handler/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,13 @@ export class RequestHandlerService {
378378

379379
case "hyperliquid-vm": {
380380
if (request.mode === "onchain") {
381+
const additionalData = request.additionalData?.["hyperliquid-vm"];
382+
if (!additionalData) {
383+
throw externalError(
384+
"Additional data is required for generating the withdrawal request"
385+
);
386+
}
387+
381388
({ id, encodedData, payloadId, payloadParams } =
382389
await this._submitWithdrawRequest(chain, request));
383390

0 commit comments

Comments
 (0)