Cancel API Calls on Node Selection Change

Cancel API Calls on Node Selection Change
pull/266/head
Shahana Farooqui 4 years ago
parent f951b09940
commit 4390b85e02

@ -12,5 +12,5 @@
<link rel="stylesheet" href="styles.23454e9b918d9205be46.css"></head>
<body>
<rtl-app></rtl-app>
<script src="runtime.ca35635f4650e0b0d1dd.js" defer></script><script src="polyfills-es5.37b2eeccc22c1df73ce7.js" nomodule defer></script><script src="polyfills.f1c3d2a0bcdfc4e93ca8.js" defer></script><script src="main.628b032239af7251bc7c.js" defer></script></body>
<script src="runtime.ca35635f4650e0b0d1dd.js" defer></script><script src="polyfills-es5.37b2eeccc22c1df73ce7.js" nomodule defer></script><script src="polyfills.f1c3d2a0bcdfc4e93ca8.js" defer></script><script src="main.f7c06745bf334a7d04f3.js" defer></script></body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -4,7 +4,7 @@ import { Router } from '@angular/router';
import { Store } from '@ngrx/store';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { Subject, of } from 'rxjs';
import { map, mergeMap, catchError, withLatestFrom } from 'rxjs/operators';
import { map, mergeMap, catchError, withLatestFrom, takeUntil } from 'rxjs/operators';
import { Location } from '@angular/common';
import { environment, API_URL } from '../../../environments/environment';
@ -44,6 +44,7 @@ export class CLEffects implements OnDestroy {
this.store.dispatch(new RTLActions.ClearEffectErrorCl('FetchInfoCL'));
return this.httpClient.get<GetInfoCL>(this.CHILD_API_URL + environment.GETINFO_API)
.pipe(
takeUntil(this.actions$.pipe(ofType(RTLActions.SET_SELECTED_NODE))),
map((info) => {
this.logger.info(info);
this.initializeRemainingData(info, action.payload.loadPage);

@ -4,7 +4,7 @@ import { Router } from '@angular/router';
import { Store } from '@ngrx/store';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { of, Subject } from 'rxjs';
import { map, mergeMap, catchError, withLatestFrom } from 'rxjs/operators';
import { map, mergeMap, catchError, withLatestFrom, takeUntil } from 'rxjs/operators';
import { Location } from '@angular/common';
import { MatDialog } from '@angular/material';
@ -47,6 +47,7 @@ export class LNDEffects implements OnDestroy {
this.store.dispatch(new RTLActions.ClearEffectErrorLnd('FetchInfo'));
return this.httpClient.get<GetInfo>(this.CHILD_API_URL + environment.GETINFO_API)
.pipe(
takeUntil(this.actions$.pipe(ofType(RTLActions.SET_SELECTED_NODE))),
map((info) => {
this.logger.info(info);
if (undefined === info.identity_pubkey) {

Loading…
Cancel
Save