Repost "want" after reconnect.

This commit is contained in:
Simon Lindh
2019-08-09 21:45:31 +03:00
parent c206cc8eb5
commit 1f3dd1f8a6
5 changed files with 29 additions and 10 deletions

View File

@@ -26,7 +26,7 @@ export class BlockchainComponent implements OnInit, OnDestroy {
) {}
ngOnInit() {
this.apiService.sendWebSocket({'action': 'want', data: ['stats', 'blocks', 'projected-blocks']});
this.apiService.webSocketWant(['stats', 'blocks', 'projected-blocks']);
this.txTrackingSubscription = this.memPoolService.txTracking$
.subscribe((response: ITxTracking) => {
@@ -46,14 +46,14 @@ export class BlockchainComponent implements OnInit, OnDestroy {
return;
}
this.txTrackingLoading = true;
this.apiService.sendWebSocket({'action': 'track-tx', 'txId': txId});
this.apiService.webSocketStartTrackTx(txId);
});
this.memPoolService.txIdSearch$
.subscribe((txId) => {
if (txId) {
this.txTrackingLoading = true;
this.apiService.sendWebSocket({'action': 'track-tx', 'txId': txId});
this.apiService.webSocketStartTrackTx(txId);
}
});