File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -467,15 +467,14 @@ export async function getRosettaBlockFromDataStore(
467467 blockHeight ?: number
468468) : Promise < FoundOrNot < RosettaBlock > > {
469469 return await db . sqlTransaction ( async sql => {
470- let query ;
470+ let blockQuery : FoundOrNot < DbBlock > ;
471471 if ( blockHash ) {
472- query = db . getBlock ( { hash : blockHash } ) ;
472+ blockQuery = await db . getBlock ( { hash : blockHash } ) ;
473473 } else if ( blockHeight && blockHeight > 0 ) {
474- query = db . getBlock ( { height : blockHeight } ) ;
474+ blockQuery = await db . getBlock ( { height : blockHeight } ) ;
475475 } else {
476- query = db . getCurrentBlock ( ) ;
476+ blockQuery = await db . getCurrentBlock ( ) ;
477477 }
478- const blockQuery = await query ;
479478
480479 if ( ! blockQuery . found ) {
481480 return { found : false } ;
You can’t perform that action at this time.
0 commit comments