@@ -44,14 +44,18 @@ const Schema = {
4444 currencyHyperliquidSymbol : Type . String ( {
4545 description : "The Hyperliquid symbol for the currency" ,
4646 } ) ,
47- } )
47+ currentTime : Type . Number ( {
48+ description :
49+ "The timestamp to be used for the Hyperliquid transaction" ,
50+ } ) ,
51+ } ) ,
4852 ) ,
4953 } ,
5054 {
5155 description :
5256 "Additional data needed for generating the withdrawal request" ,
53- }
54- )
57+ } ,
58+ ) ,
5559 ) ,
5660 owner : Type . String ( {
5761 description : "The address of the owner (that triggered the withdrawal)" ,
@@ -71,12 +75,12 @@ const Schema = {
7175 } ) ,
7276 signer : Type . String ( { description : "The signer of the withdrawal" } ) ,
7377 submitWithdrawalRequestParams : Type . Optional (
74- SubmitWithdrawalRequestParamsSchema
78+ SubmitWithdrawalRequestParamsSchema ,
7579 ) ,
7680 signature : Type . Optional (
7781 Type . String ( {
7882 description : "The allocator signature for the withdrawal" ,
79- } )
83+ } ) ,
8084 ) ,
8185 } ) ,
8286 ...ErrorResponse ,
@@ -89,16 +93,16 @@ export default {
8993 schema : Schema ,
9094 handler : async (
9195 req : FastifyRequestTypeBox < typeof Schema > ,
92- reply : FastifyReplyTypeBox < typeof Schema >
96+ reply : FastifyReplyTypeBox < typeof Schema > ,
9397 ) => {
9498 // make sure we got EVM sig
9599 const signatureVmType = await getChain ( req . body . ownerChainId ) . then (
96- ( c ) => c . vmType
100+ ( c ) => c . vmType ,
97101 ) ;
98102 if ( signatureVmType !== "ethereum-vm" ) {
99103 throw externalError (
100104 "Only 'ethereum-vm' signatures are supported" ,
101- "UNSUPPORTED_SIGNATURE"
105+ "UNSUPPORTED_SIGNATURE" ,
102106 ) ;
103107 }
104108
@@ -109,7 +113,7 @@ export default {
109113 req . body . spender as `0x${string } `, // withdrawalAddress
110114 BigInt ( req . body . amount ) ,
111115 req . body . nonce as `0x${string } `,
112- ]
116+ ] ,
113117 ) ;
114118
115119 // authentify the proof of withdrawal address balance
@@ -133,7 +137,7 @@ export default {
133137 JSON . stringify ( {
134138 msg : "Executing `withdrawal` request (v2)" ,
135139 request : req . body ,
136- } )
140+ } ) ,
137141 ) ;
138142
139143 const requestHandler = new RequestHandlerService ( ) ;
@@ -148,7 +152,7 @@ export default {
148152 msg : "Executed `withdrawal` request" ,
149153 request : req . body ,
150154 result,
151- } )
155+ } ) ,
152156 ) ;
153157
154158 return reply . status ( 200 ) . send ( result ) ;
0 commit comments