@@ -98,7 +98,7 @@ export class RequestHandlerService {
9898 case "ethereum-vm" : {
9999 if ( request . mode === "onchain" ) {
100100 const { contract, publicClient, walletClient } =
101- await getOnchainAllocator ( ) ;
101+ await getOnchainAllocator ( request . chainId ) ;
102102
103103 payloadParams = {
104104 chainId : chain . metadata . allocatorChainId ! ,
@@ -112,7 +112,7 @@ export class RequestHandlerService {
112112 } ;
113113
114114 // This is needed before being able to submit withdraw requests
115- await handleOneTimeApproval ( ) ;
115+ await handleOneTimeApproval ( request . chainId ) ;
116116
117117 const txHash = await contract . write . submitWithdrawRequest ( [
118118 payloadParams as any ,
@@ -238,7 +238,7 @@ export class RequestHandlerService {
238238 case "solana-vm" : {
239239 if ( request . mode === "onchain" ) {
240240 const { contract, publicClient, walletClient } =
241- await getOnchainAllocator ( ) ;
241+ await getOnchainAllocator ( request . chainId ) ;
242242
243243 // The "solana-vm" payload builder expects addresses to be hex-encoded
244244 const toHexString = ( address : string ) =>
@@ -259,7 +259,7 @@ export class RequestHandlerService {
259259 } ;
260260
261261 // This is needed before being able to submit withdraw requests
262- await handleOneTimeApproval ( ) ;
262+ await handleOneTimeApproval ( request . chainId ) ;
263263
264264 const txHash = await contract . write . submitWithdrawRequest ( [
265265 payloadParams as any ,
@@ -466,7 +466,7 @@ export class RequestHandlerService {
466466 case "hyperliquid-vm" : {
467467 if ( request . mode === "onchain" ) {
468468 const { contract, publicClient, walletClient } =
469- await getOnchainAllocator ( ) ;
469+ await getOnchainAllocator ( request . chainId ) ;
470470
471471 const isNativeCurrency =
472472 request . currency === getVmTypeNativeCurrency ( chain . vmType ) ;
@@ -509,7 +509,7 @@ export class RequestHandlerService {
509509 } ;
510510
511511 // This is needed before being able to submit withdraw requests
512- await handleOneTimeApproval ( ) ;
512+ await handleOneTimeApproval ( request . chainId ) ;
513513
514514 const txHash = await contract . write . submitWithdrawRequest ( [
515515 payloadParams as any ,
@@ -716,7 +716,9 @@ export class RequestHandlerService {
716716 throw externalError ( "Withdrawal request not using 'onchain' mode" ) ;
717717 }
718718
719- const { contract, publicClient } = await getOnchainAllocator ( ) ;
719+ const { contract, publicClient } = await getOnchainAllocator (
720+ withdrawalRequest . chainId
721+ ) ;
720722
721723 const payloadTimestamp = await contract . read . payloadTimestamps ( [
722724 withdrawalRequest . payloadId as Hex ,
0 commit comments