only query blocks_audits on bitcoin networks
This commit is contained in:
		
							parent
							
								
									e1f77028c9
								
							
						
					
					
						commit
						b25e362282
					
				@ -652,7 +652,10 @@ class Blocks {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public async $getBlockAuditSummary(hash: string): Promise<any> {
 | 
			
		||||
    let summary = await BlocksAuditsRepository.$getBlockAudit(hash);
 | 
			
		||||
    let summary;
 | 
			
		||||
    if (['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK)) {
 | 
			
		||||
      summary = await BlocksAuditsRepository.$getBlockAudit(hash);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // fallback to non-audited transaction summary
 | 
			
		||||
    if (!summary?.transactions?.length) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user