@@ -28,11 +28,10 @@ export class TransactionDetailsComponent implements OnInit {
2828 public showCoins = true ;
2929 @Input ( )
3030 public chainNetwork : ChainNetwork ;
31+ public confirmations : number ;
3132 @Input ( )
3233 public page : string ;
3334
34- public confirmations ;
35-
3635 private COIN = 100000000 ;
3736 private DEFAULT_RBF_SEQNUMBER = 0xffffffff ;
3837
@@ -47,11 +46,8 @@ export class TransactionDetailsComponent implements OnInit {
4746 ) { }
4847
4948 public ngOnInit ( ) : void {
50- this . getConfirmations ( ) ;
5149 if ( this . chainNetwork . chain !== 'ETH' ) {
52- if ( ! this . tx . vin || ! this . tx . vin . length ) {
53- this . getCoins ( ) ;
54- }
50+ this . getConfirmations ( ) ;
5551 }
5652 }
5753
@@ -63,15 +59,13 @@ export class TransactionDetailsComponent implements OnInit {
6359 this . tx . vout = data . outputs ;
6460 this . tx . fee = this . txProvider . getFee ( this . tx ) ;
6561 this . tx . isRBF = _ . some ( data . inputs , input => {
66- return (
67- input . sequenceNumber &&
68- input . sequenceNumber < this . DEFAULT_RBF_SEQNUMBER - 1
69- ) ;
62+ return input . sequenceNumber && input . sequenceNumber < this . DEFAULT_RBF_SEQNUMBER - 1 ;
7063 } ) ;
7164 this . tx . hasUnconfirmedInputs = _ . some ( data . inputs , input => {
7265 return input . mintHeight < 0 ;
7366 } ) ;
7467 this . tx . valueOut = data . outputs . reduce ( ( a , b ) => a + b . value , 0 ) ;
68+ this . getConfirmations ( ) ;
7569 } ) ;
7670 }
7771
0 commit comments