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(
467
467
blockHeight ?: number
468
468
) : Promise < FoundOrNot < RosettaBlock > > {
469
469
return await db . sqlTransaction ( async sql => {
470
- let query ;
470
+ let blockQuery : FoundOrNot < DbBlock > ;
471
471
if ( blockHash ) {
472
- query = db . getBlock ( { hash : blockHash } ) ;
472
+ blockQuery = await db . getBlock ( { hash : blockHash } ) ;
473
473
} else if ( blockHeight && blockHeight > 0 ) {
474
- query = db . getBlock ( { height : blockHeight } ) ;
474
+ blockQuery = await db . getBlock ( { height : blockHeight } ) ;
475
475
} else {
476
- query = db . getCurrentBlock ( ) ;
476
+ blockQuery = await db . getCurrentBlock ( ) ;
477
477
}
478
- const blockQuery = await query ;
479
478
480
479
if ( ! blockQuery . found ) {
481
480
return { found : false } ;
You can’t perform that action at this time.
0 commit comments