File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
packages/sources/view-function-multi-chain/src/transport Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -58,10 +58,7 @@ export class MultiChainFunctionTransport<
5858
5959 async backgroundHandler ( context : EndpointContext < T > , entries : RequestParams < T > [ ] ) {
6060 await Promise . all ( entries . map ( async ( param ) => this . handleRequest ( param ) ) )
61- await sleep (
62- ( context . adapterSettings as unknown as { BACKGROUND_EXECUTE_MS : number } )
63- . BACKGROUND_EXECUTE_MS ,
64- )
61+ await sleep ( context . adapterSettings . BACKGROUND_EXECUTE_MS )
6562 }
6663
6764 async handleRequest ( param : RequestParams < T > ) {
@@ -82,9 +79,7 @@ export class MultiChainFunctionTransport<
8279 }
8380 }
8481
85- await this . responseCache . write ( this . name , [
86- { params : param as TypeFromDefinition < T [ 'Parameters' ] > , response } ,
87- ] )
82+ await this . responseCache . write ( this . name , [ { params : param , response } ] )
8883 }
8984
9085 async _handleRequest ( param : RequestParams < T > ) : Promise < AdapterResponse < T [ 'Response' ] > > {
@@ -216,7 +211,7 @@ export class MultiChainFunctionTransport<
216211 }
217212
218213 getSubscriptionTtlFromConfig ( adapterSettings : T [ 'Settings' ] ) : number {
219- return ( adapterSettings as { WARMUP_SUBSCRIPTION_TTL : number } ) . WARMUP_SUBSCRIPTION_TTL
214+ return adapterSettings . WARMUP_SUBSCRIPTION_TTL
220215 }
221216}
222217
You can’t perform that action at this time.
0 commit comments