feat: migrate to Angular 14 and RxJS 7 (#1681)

* feat: migrate to Angular 14 and RxJS 7

* chore: update ng-qrcode

* chore: update patch-db

* chore: remove unnecessary generics
This commit is contained in:
Alex Inkin
2022-07-28 06:31:46 +03:00
committed by GitHub
parent 9514b97ca0
commit a5c97d4c24
24 changed files with 4791 additions and 4434 deletions

View File

@@ -26,7 +26,6 @@ const { useMocks } = require('../../../../config.json') as WorkspaceConfig
@NgModule({
declarations: [AppComponent],
entryComponents: [],
imports: [
BrowserModule,
IonicModule.forRoot({

View File

@@ -1,11 +1,6 @@
import { Injectable } from '@angular/core'
import {
HttpClient,
HttpErrorResponse,
HttpHeaders,
HttpParams,
} from '@angular/common/http'
import { Observable } from 'rxjs'
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'
import { firstValueFrom, Observable } from 'rxjs'
import * as aesjs from 'aes-js'
import * as pbkdf2 from 'pbkdf2'
import { HttpError, RpcError } from '@start9labs/shared'
@@ -70,8 +65,7 @@ export class HttpService {
const req = this.http.post(url, options.body, options)
return req
.toPromise()
return firstValueFrom(req)
.then(res =>
AES_CTR.decryptPbkdf2(
this.productKey || '',
@@ -112,8 +106,7 @@ export class HttpService {
options,
) as any
return req
.toPromise()
return firstValueFrom(req)
.then(res => res.body)
.catch(e => {
throw new HttpError(e)