File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ const UNIQUE_RPCs: { [K in UNIQUE_CHAINS]: string } = {
2222
2323type RequestRPC = < T = any > ( method : string , params : unknown [ ] ) => Promise < T >
2424
25- const buildJsonRpc = ( rpcUrl : string ) : RequestRPC => async ( method , params ) => {
25+ const requestRPCFactory = ( rpcUrl : string ) : RequestRPC => async ( method , params ) => {
2626 const fetch = globalThis . fetch
2727 const response = await fetch ( rpcUrl , {
2828 method : 'POST' ,
@@ -359,7 +359,7 @@ export interface ChainLensOptions {
359359}
360360
361361export const generateChainLens = ( rpcBaseUrlOrRequestRPC : string | RequestRPC , options : ChainLensOptions = { ss58Prefix : 42 } ) => {
362- const requestRPC = typeof rpcBaseUrlOrRequestRPC === 'string' ? buildJsonRpc ( rpcBaseUrlOrRequestRPC ) : rpcBaseUrlOrRequestRPC
362+ const requestRPC = typeof rpcBaseUrlOrRequestRPC === 'string' ? requestRPCFactory ( rpcBaseUrlOrRequestRPC ) : rpcBaseUrlOrRequestRPC
363363
364364 const ss58Prefix = options . ss58Prefix
365365
You can’t perform that action at this time.
0 commit comments