File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -49,15 +49,15 @@ export const statusHandler = async (req: Request, res: Response) => {
49
49
const txHash = req . body ?. txHash ;
50
50
51
51
if ( typeof txHash !== "string" || ! txHash ) {
52
- return res
53
- . status ( 400 )
54
- . json ( { message : "txHash must be a valid string." } ) ;
52
+ res . status ( 400 ) . json ( { message : "txHash must be a valid string." } ) ;
53
+ return ;
55
54
}
56
55
57
56
if ( chainId && ! isPositiveWholeNumber ( chainId ) ) {
58
- return res
57
+ res
59
58
. status ( 400 )
60
59
. json ( { message : "chainId, if defined, must be a number." } ) ;
60
+ return ;
61
61
}
62
62
63
63
if ( ! enabledChainIds . includes ( chainId . toString ( ) ) ) {
@@ -85,6 +85,7 @@ export const statusHandler = async (req: Request, res: Response) => {
85
85
86
86
if ( existentRelayRequestData && existentRelayRequestData . length > 0 ) {
87
87
res . status ( 200 ) . json ( existentRelayRequestData ) ;
88
+ return ;
88
89
}
89
90
90
91
const requestsForExecution = await EvmHandler . getRequestsForExecution (
@@ -118,10 +119,12 @@ export const statusHandler = async (req: Request, res: Response) => {
118
119
processRelayRequests ,
119
120
) ;
120
121
121
- return res . status ( 200 ) . json ( relayRequests ) ;
122
+ res . status ( 200 ) . json ( relayRequests ) ;
123
+ return ;
122
124
} catch ( error ) {
123
125
console . error ( "Error handling status request:" , error ) ;
124
126
res . status ( 500 ) . json ( { error : "Failed to process request" } ) ;
127
+ return ;
125
128
}
126
129
} ;
127
130
You can’t perform that action at this time.
0 commit comments