2021-08-28 21:03:18 +00:00
|
|
|
import { HammerModule } from '@angular/platform-browser';
|
2019-03-19 00:13:01 +00:00
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
2019-08-24 20:35:31 +00:00
|
|
|
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
2021-12-29 23:08:41 +00:00
|
|
|
import { LayoutModule } from '@angular/cdk/layout';
|
2019-08-24 20:35:31 +00:00
|
|
|
|
2019-03-19 00:13:01 +00:00
|
|
|
import { StoreModule } from '@ngrx/store';
|
|
|
|
import { EffectsModule } from '@ngrx/effects';
|
|
|
|
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
|
|
|
|
2019-08-24 20:35:31 +00:00
|
|
|
import { UserIdleModule } from 'angular-user-idle';
|
2019-03-19 00:13:01 +00:00
|
|
|
import { routing } from './app.routing';
|
|
|
|
import { SharedModule } from './shared/shared.module';
|
2019-08-12 01:57:49 +00:00
|
|
|
import { AppComponent } from './app.component';
|
2019-08-24 20:35:31 +00:00
|
|
|
|
|
|
|
import { environment } from '../environments/environment';
|
2020-12-20 23:36:04 +00:00
|
|
|
import { AuthGuard } from './shared/services/auth.guard';
|
|
|
|
import { AuthInterceptor } from './shared/services/auth.interceptor';
|
2019-11-06 00:26:40 +00:00
|
|
|
import { SessionService } from './shared/services/session.service';
|
2020-03-16 15:57:57 +00:00
|
|
|
import { LoopService } from './shared/services/loop.service';
|
2020-02-06 23:47:17 +00:00
|
|
|
import { DataService } from './shared/services/data.service';
|
2021-12-29 23:08:41 +00:00
|
|
|
import { WebSocketClientService } from './shared/services/web-socket.service';
|
2020-12-20 23:36:04 +00:00
|
|
|
import { CommonService } from './shared/services/common.service';
|
2021-02-21 19:02:31 +00:00
|
|
|
import { BoltzService } from './shared/services/boltz.service';
|
2019-03-19 00:13:01 +00:00
|
|
|
|
2019-08-31 02:05:27 +00:00
|
|
|
import { RTLEffects } from './store/rtl.effects';
|
2019-09-01 19:55:52 +00:00
|
|
|
import { LNDEffects } from './lnd/store/lnd.effects';
|
2022-05-01 17:35:20 +00:00
|
|
|
import { CLNEffects } from './cln/store/cln.effects';
|
2020-07-07 17:57:15 +00:00
|
|
|
import { ECLEffects } from './eclair/store/ecl.effects';
|
2021-12-29 23:08:41 +00:00
|
|
|
import { RootReducer } from './store/rtl.reducers';
|
|
|
|
import { LNDReducer } from './lnd/store/lnd.reducers';
|
2022-05-01 17:35:20 +00:00
|
|
|
import { CLNReducer } from './cln/store/cln.reducers';
|
2021-12-29 23:08:41 +00:00
|
|
|
import { ECLReducer } from './eclair/store/ecl.reducers';
|
2019-08-31 02:05:27 +00:00
|
|
|
|
2019-03-19 00:13:01 +00:00
|
|
|
@NgModule({
|
|
|
|
imports: [
|
|
|
|
BrowserAnimationsModule,
|
|
|
|
SharedModule,
|
|
|
|
routing,
|
2020-12-20 23:36:04 +00:00
|
|
|
LayoutModule,
|
|
|
|
HammerModule,
|
2021-08-28 21:03:18 +00:00
|
|
|
UserIdleModule.forRoot({ idle: 3590, timeout: 10, ping: 12000 }), // One hour
|
2021-12-29 23:08:41 +00:00
|
|
|
StoreModule.forRoot(
|
2022-05-01 17:35:20 +00:00
|
|
|
{ root: RootReducer, lnd: LNDReducer, cln: CLNReducer, ecl: ECLReducer },
|
2021-12-29 23:08:41 +00:00
|
|
|
{
|
|
|
|
runtimeChecks: {
|
|
|
|
strictStateImmutability: false,
|
|
|
|
strictActionImmutability: false
|
|
|
|
}
|
|
|
|
}),
|
2022-05-01 17:35:20 +00:00
|
|
|
EffectsModule.forRoot([RTLEffects, LNDEffects, CLNEffects, ECLEffects]),
|
2020-12-20 23:36:04 +00:00
|
|
|
!environment.production ? StoreDevtoolsModule.instrument() : []
|
2019-03-19 00:13:01 +00:00
|
|
|
],
|
2020-12-20 23:36:04 +00:00
|
|
|
declarations: [AppComponent],
|
2019-03-19 00:13:01 +00:00
|
|
|
providers: [
|
2020-03-10 17:25:52 +00:00
|
|
|
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true },
|
2021-12-29 23:08:41 +00:00
|
|
|
AuthGuard, SessionService, DataService, WebSocketClientService, LoopService, CommonService, BoltzService
|
2019-03-19 00:13:01 +00:00
|
|
|
],
|
|
|
|
bootstrap: [AppComponent]
|
|
|
|
})
|
2021-12-29 23:08:41 +00:00
|
|
|
export class AppModule { }
|