Don't lookup transaction times for confirmed transactions

This commit is contained in:
softsimon 2020-03-10 15:33:58 +07:00
parent 3c38aaaf33
commit c0aa9ff925
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7

View File

@ -42,6 +42,7 @@ export class TransactionComponent implements OnInit, OnDestroy {
this.txId = params.get('id') || ''; this.txId = params.get('id') || '';
this.error = undefined; this.error = undefined;
this.isLoadingTx = true; this.isLoadingTx = true;
this.transactionTime = -1;
document.body.scrollTo(0, 0); document.body.scrollTo(0, 0);
if (history.state.data) { if (history.state.data) {
return of(history.state.data); return of(history.state.data);
@ -56,9 +57,8 @@ export class TransactionComponent implements OnInit, OnDestroy {
if (!tx.status.confirmed) { if (!tx.status.confirmed) {
this.websocketService.startTrackTransaction(tx.txid); this.websocketService.startTrackTransaction(tx.txid);
this.getTransactionTime();
} }
this.getTransactionTime();
}, },
(error) => { (error) => {
this.error = error; this.error = error;