@@ -234,15 +234,7 @@ export default class BlocksController extends AbstractController<BlocksService>
234234 } ;
235235
236236 // Create a key for the cache that is a concatenation of the block hash and all the query params included in the request
237- const cacheKey =
238- ahHash . toString ( ) +
239- Number ( options . eventDocs ) +
240- Number ( options . extrinsicDocs ) +
241- Number ( options . checkFinalized ) +
242- Number ( options . noFees ) +
243- Number ( options . checkDecodedXcm ) +
244- Number ( options . paraId ) +
245- Number ( options . useEvmAddressFormat ) ;
237+ const cacheKey = ahHash . toString ( ) + Object . values ( options ) . join ( ) ;
246238
247239 const isBlockCached = this . blockStore . get ( cacheKey ) ;
248240
@@ -318,15 +310,7 @@ export default class BlocksController extends AbstractController<BlocksService>
318310 useEvmAddressFormat : useEvmFormat === 'true' ,
319311 } ;
320312 // Create a key for the cache that is a concatenation of the block hash and all the query params included in the request
321- const cacheKey =
322- hash . toString ( ) +
323- Number ( options . eventDocs ) +
324- Number ( options . extrinsicDocs ) +
325- Number ( options . checkFinalized ) +
326- Number ( options . noFees ) +
327- Number ( options . checkDecodedXcm ) +
328- Number ( options . paraId ) +
329- Number ( options . useEvmAddressFormat ) ;
313+ const cacheKey = hash . toString ( ) + Object . values ( options ) . join ( ) ;
330314
331315 const isBlockCached = this . blockStore . get ( cacheKey ) ;
332316
@@ -409,15 +393,7 @@ export default class BlocksController extends AbstractController<BlocksService>
409393 } ;
410394
411395 // Create a key for the cache that is a concatenation of the block hash and all the query params included in the request
412- const cacheKey =
413- ahHash . toString ( ) +
414- Number ( options . eventDocs ) +
415- Number ( options . extrinsicDocs ) +
416- Number ( options . checkFinalized ) +
417- Number ( options . noFees ) +
418- Number ( options . checkDecodedXcm ) +
419- Number ( options . paraId ) +
420- Number ( options . useEvmAddressFormat ) ;
396+ const cacheKey = ahHash . toString ( ) + Object . values ( options ) . join ( ) ;
421397
422398 const isBlockCached = this . blockStore . get ( cacheKey ) ;
423399
@@ -490,15 +466,7 @@ export default class BlocksController extends AbstractController<BlocksService>
490466 } ;
491467
492468 // Create a key for the cache that is a concatenation of the block hash and all the query params included in the request
493- const cacheKey =
494- hash . toString ( ) +
495- Number ( options . eventDocs ) +
496- Number ( options . extrinsicDocs ) +
497- Number ( options . checkFinalized ) +
498- Number ( options . noFees ) +
499- Number ( options . checkDecodedXcm ) +
500- Number ( options . paraId ) +
501- Number ( options . useEvmAddressFormat ) ;
469+ const cacheKey = hash . toString ( ) + Object . values ( options ) . join ( ) ;
502470
503471 const isBlockCached = this . blockStore . get ( cacheKey ) ;
504472
0 commit comments