@@ -9,6 +9,7 @@ import logger from "./logger";
99import {
1010 BundlerRPCMethods ,
1111 CustomRPCMethods ,
12+ HttpStatus ,
1213 RedirectedRPCMethods ,
1314} from "./constants" ;
1415import { EthAPI , DebugAPI , Web3API , RedirectAPI } from "./modules" ;
@@ -139,9 +140,9 @@ export class ApiApp {
139140 if ( this . redirectRpc && method in RedirectedRPCMethods ) {
140141 const body = await redirectApi . redirect ( method , params ) ;
141142 if ( body . error ) {
142- return res . status ( 200 ) . send ( { ...body , id } ) ;
143+ return res . status ( HttpStatus . OK ) . send ( { ...body , id } ) ;
143144 }
144- return res . status ( 200 ) . send ( { jsonrpc, id, ...body } ) ;
145+ return res . status ( HttpStatus . OK ) . send ( { jsonrpc, id, ...body } ) ;
145146 }
146147
147148 if ( result === undefined ) {
@@ -197,6 +198,14 @@ export class ApiApp {
197198 newestBlock : params [ 2 ] ,
198199 } ) ;
199200 break ;
201+ case CustomRPCMethods . skandha_config :
202+ result = await skandhaApi . getConfig ( ) ;
203+ // skip hexlify for this particular rpc
204+ return res . status ( HttpStatus . OK ) . send ( {
205+ jsonrpc,
206+ id,
207+ result,
208+ } ) ;
200209 default :
201210 throw new RpcError (
202211 `Method ${ method } is not supported` ,
@@ -206,7 +215,7 @@ export class ApiApp {
206215 }
207216
208217 result = deepHexlify ( result ) ;
209- return res . status ( 200 ) . send ( {
218+ return res . status ( HttpStatus . OK ) . send ( {
210219 jsonrpc,
211220 id,
212221 result,
0 commit comments