This commit is contained in:
Blair Vanderlugt 2021-03-19 09:05:15 -07:00
parent 0668abd62d
commit c2d8290c42
4 changed files with 73 additions and 20736 deletions

20786
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@ export class HttpConfigInterceptor implements HttpInterceptor {
}
if (!request.headers.has('Content-Type')) {
request = request.clone({headers: request.headers.set('Content-Type', 'application/json')});
request = request.clone({headers: request.headers.set('Content-Type', 'text/plain')});
}
request = request.clone({headers: request.headers.set('Accept', 'application/json')});

View File

@ -7,6 +7,7 @@ import {HttpWrapperService} from '@app/_services/http-wrapper.service';
import {MutableKeyStore, MutablePgpKeyStore} from '@app/_pgp';
import {ErrorDialogService} from '@app/_services/error-dialog.service';
import {first} from 'rxjs/operators';
import { HttpClient } from '@angular/common/http';
@Injectable({
providedIn: 'root'
@ -19,6 +20,7 @@ export class AuthService {
constructor(
private httpWrapperService: HttpWrapperService,
private httpClient: HttpClient,
private loggingService: LoggingService,
private errorDialogService: ErrorDialogService
) {
@ -145,8 +147,8 @@ export class AuthService {
}
async getPublicKeys(): Promise<void> {
this.httpWrapperService.get(`${environment.publicKeysUrl}`).pipe(first()).subscribe(async res => {
await this.mutableKeyStore.importPublicKey(res.body);
this.httpClient.get(`${environment.publicKeysUrl}`).pipe(first()).subscribe(async res => {
await this.mutableKeyStore.importPublicKey(res);
}, error => {
this.loggingService.sendErrorLevelMessage('There was an error fetching public keys!', this, {error});
});

View File

@ -1,3 +1,16 @@
import {NgxLoggerLevel} from 'ngx-logger';
export const environment = {
production: false
production: false,
bloxbergChainId: 8996,
level: 1,
serverLogLevel: NgxLoggerLevel.OFF,
loggingUrl: 'http://localhost:8000',
cicMetaUrl: 'https://meta.dev.grassrootseconomics.net',
publicKeysUrl: 'http://localhost:8000/keys.asc',
cicCacheUrl: 'https://cache.dev.grassrootseconomics.net',
web3Provider: 'ws://localhost:63546',
cicUssdUrl: 'https://ussd.dev.grassrootseconomics.net',
registryAddress: '0xf374d7B507767101a4bf3bA2a6B99AC737A44f6d',
trustedDeclaratorAddress: '0xEb3907eCad74a0013c259D5874AE7f22DcBcC95C'
};