Confirmed address transactions fix. QR Code fix. (take 2)

This commit is contained in:
softsimon
2020-02-26 23:21:16 +07:00
parent 4efbb7be55
commit c3b047b6da
4 changed files with 32 additions and 33 deletions

View File

@@ -27,18 +27,6 @@ export class WebsocketService {
startSubscription() {
this.websocketSubject.next({'action': 'init'});
this.websocketSubject
.pipe(
retryWhen((errors: any) => errors
.pipe(
tap(() => {
this.goneOffline = true;
this.websocketSubject.next({'action': 'init'});
this.stateService.isOffline$.next(true);
}),
delay(5000),
)
),
)
.subscribe((response: WebsocketResponse) => {
if (response.blocks && response.blocks.length) {
const blocks = response.blocks;
@@ -110,6 +98,7 @@ export class WebsocketService {
(err: Error) => {
console.log(err);
this.goneOffline = true;
this.stateService.isOffline$.next(true);
console.log('Error, retrying in 10 sec');
window.setTimeout(() => this.startSubscription(), 10000);
});