Skip to content

Commit 2af6398

Browse files
committed
Start polling services with empty array
1 parent ef3ccd9 commit 2af6398

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/app/services/channel-polling.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Injectable } from '@angular/core';
22
import { BehaviorSubject, Observable, combineLatest } from 'rxjs';
3-
import { scan, switchMap, tap, map, shareReplay } from 'rxjs/operators';
3+
import { scan, switchMap, tap, map, shareReplay, startWith } from 'rxjs/operators';
44
import { Channel } from '../models/channel';
55
import { RaidenConfig } from './raiden.config';
66
import { RaidenService } from './raiden.service';
@@ -45,6 +45,7 @@ export class ChannelPollingService {
4545
this.checkForNewChannels(oldChannels, newChannels);
4646
return newChannels;
4747
}, []),
48+
startWith([]),
4849
backoff(
4950
this.raidenConfig.config.error_poll_interval,
5051
this.raidenService.globalRetry$

src/app/services/payment-history-polling.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Injectable } from '@angular/core';
22
import { BehaviorSubject, Observable } from 'rxjs';
3-
import { switchMap, tap, shareReplay, scan } from 'rxjs/operators';
3+
import { switchMap, tap, shareReplay, scan, startWith } from 'rxjs/operators';
44
import { RaidenConfig } from './raiden.config';
55
import { RaidenService } from './raiden.service';
66
import { backoff } from '../shared/backoff.operator';
@@ -43,6 +43,7 @@ export class PaymentHistoryPollingService {
4343
this.checkForNewPayments(oldHistory, newHistory);
4444
return newHistory;
4545
}, []),
46+
startWith([]),
4647
backoff(
4748
this.raidenConfig.config.error_poll_interval,
4849
this.raidenService.globalRetry$

src/app/services/pending-transfer-polling.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Injectable } from '@angular/core';
22
import { BehaviorSubject, Observable } from 'rxjs';
3-
import { scan, switchMap, tap, shareReplay } from 'rxjs/operators';
3+
import { scan, switchMap, tap, shareReplay, startWith } from 'rxjs/operators';
44
import { RaidenConfig } from './raiden.config';
55
import { RaidenService } from './raiden.service';
66
import { backoff } from '../shared/backoff.operator';
@@ -53,6 +53,7 @@ export class PendingTransferPollingService {
5353
},
5454
[]
5555
),
56+
startWith([]),
5657
backoff(
5758
this.raidenConfig.config.error_poll_interval,
5859
this.raidenService.globalRetry$

0 commit comments

Comments
 (0)