2020-07-22 19:21:40 +07:00
|
|
|
import { Component, OnInit, OnDestroy } from '@angular/core';
|
2020-02-16 22:15:07 +07:00
|
|
|
import { StateService } from 'src/app/services/state.service';
|
2020-07-22 19:21:40 +07:00
|
|
|
import { Subscription } from 'rxjs';
|
2019-07-21 17:59:47 +03:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-blockchain',
|
|
|
|
templateUrl: './blockchain.component.html',
|
|
|
|
styleUrls: ['./blockchain.component.scss']
|
|
|
|
})
|
2020-07-22 19:21:40 +07:00
|
|
|
export class BlockchainComponent implements OnInit, OnDestroy {
|
2019-07-21 17:59:47 +03:00
|
|
|
txTrackingLoading = false;
|
|
|
|
txShowTxNotFound = false;
|
2019-07-24 23:08:28 +03:00
|
|
|
isLoading = true;
|
2020-07-22 19:21:40 +07:00
|
|
|
subscription: Subscription;
|
2019-07-21 17:59:47 +03:00
|
|
|
|
|
|
|
constructor(
|
2020-02-16 22:15:07 +07:00
|
|
|
private stateService: StateService,
|
2019-07-21 17:59:47 +03:00
|
|
|
) {}
|
|
|
|
|
|
|
|
ngOnInit() {
|
2020-07-22 19:21:40 +07:00
|
|
|
this.subscription = this.stateService.isLoadingWebSocket$
|
|
|
|
.subscribe((isLoading) => this.isLoading = isLoading);
|
|
|
|
}
|
|
|
|
|
|
|
|
ngOnDestroy() {
|
|
|
|
this.subscription.unsubscribe();
|
2019-07-21 17:59:47 +03:00
|
|
|
}
|
|
|
|
}
|