mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2024-11-19 09:50:36 +01:00
Cancel API Calls on Node Selection Change
Cancel API Calls on Node Selection Change
This commit is contained in:
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
1
angular/main.f7c06745bf334a7d04f3.js
Normal file
1
angular/main.f7c06745bf334a7d04f3.js
Normal file
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…
Reference in New Issue
Block a user