Optimization for bisq transaction table rendering
This commit is contained in:
		
							parent
							
								
									83a0e53300
								
							
						
					
					
						commit
						8aefbb5449
					
				@ -77,5 +77,7 @@ export class BisqIconComponent implements OnChanges {
 | 
			
		||||
        this.iconProp[1] = 'question';
 | 
			
		||||
        this.color = 'ffac00';
 | 
			
		||||
    }
 | 
			
		||||
    // @ts-ignore
 | 
			
		||||
    this.iconProp = this.iconProp.slice();
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -22,7 +22,7 @@
 | 
			
		||||
      <th class="d-none d-md-block">Height</th>
 | 
			
		||||
    </thead>
 | 
			
		||||
    <tbody *ngIf="transactions.value; else loadingTmpl">
 | 
			
		||||
      <tr *ngFor="let tx of transactions.value[0]">
 | 
			
		||||
      <tr *ngFor="let tx of transactions.value[0]; trackBy: trackByFn">
 | 
			
		||||
        <td><a [routerLink]="['/tx/' | relativeUrl, tx.id]" [state]="{ data: tx }">{{ tx.id | slice : 0 : 8 }}</a></td>
 | 
			
		||||
        <td class="d-none d-md-block">
 | 
			
		||||
          <app-bisq-icon class="mr-1" [txType]="tx.txType"></app-bisq-icon>
 | 
			
		||||
 | 
			
		||||
@ -173,4 +173,8 @@ export class BisqTransactionsComponent implements OnInit {
 | 
			
		||||
  calculateTotalOutput(outputs: BisqOutput[]): number {
 | 
			
		||||
    return outputs.reduce((acc: number, output: BisqOutput) => acc + output.bsqAmount, 0);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  trackByFn(index: number) {
 | 
			
		||||
    return index;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user