Transaction tracking revamped.

Blockchain block arrow.
This commit is contained in:
Simon Lindh authored and wiz committed 2020-02-26 03:28:57 +09:00
1 parent 34645908e9
commit f3cfa038d3
15 files changed
+232 -145

No files matched your search

+12 -3
View File
@@ -16,6 +16,7 @@ export class WebsocketService {
private goneOffline = false;
private lastWant: string[] | null = null;
private trackingTxId: string | null = null;
private trackingAddress: string | null = null;
constructor(
private stateService: StateService,
@@ -86,7 +87,10 @@ export class WebsocketService {
this.want(this.lastWant);
}
if (this.trackingTxId) {
this.startTrackTx(this.trackingTxId);
this.startTrackTransaction(this.trackingTxId);
}
if (this.trackingAddress) {
this.startTrackTransaction(this.trackingAddress);
}
this.stateService.isOffline$.next(false);
}
@@ -99,11 +103,16 @@ export class WebsocketService {
});
}
startTrackTx(txId: string) {
this.websocketSubject.next({ txId });
startTrackTransaction(txId: string) {
this.websocketSubject.next({ 'track-tx': txId });
this.trackingTxId = txId;
}
startTrackAddress(address: string) {
this.websocketSubject.next({ 'track-address': address });
this.trackingAddress = address;
}
fetchStatistics(historicalDate: string) {
this.websocketSubject.next({ historicalDate });
}