Bugfix: Don't extend already extended transactions to not override the firstSeen property.
fixes #390
This commit is contained in:
		
							parent
							
								
									5148de8f17
								
							
						
					
					
						commit
						e688948e42
					
				@ -26,6 +26,11 @@ class TransactionUtils {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  private extendTransaction(transaction: IEsploraApi.Transaction): TransactionExtended {
 | 
			
		||||
    // @ts-ignore
 | 
			
		||||
    if (transaction.vsize) {
 | 
			
		||||
      // @ts-ignore
 | 
			
		||||
      return transaction;
 | 
			
		||||
    }
 | 
			
		||||
    const feePerVbytes = Math.max(1, (transaction.fee || 0) / (transaction.weight / 4));
 | 
			
		||||
    const transactionExtended: TransactionExtended = Object.assign({
 | 
			
		||||
      vsize: Math.round(transaction.weight / 4),
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user