From 208c44898482ff994b6db0e71cf84f072eed8928 Mon Sep 17 00:00:00 2001 From: Spencer Ofwiti Date: Tue, 11 May 2021 20:51:48 +0300 Subject: [PATCH] Format docs using linter and prettier. --- docs/compodoc/classes/AccountIndex.html | 8 +- docs/compodoc/classes/BlocksBloom.html | 10 +- docs/compodoc/classes/Conversion.html | 10 +- .../classes/CustomErrorStateMatcher.html | 16 +- docs/compodoc/classes/CustomValidator.html | 2 +- docs/compodoc/classes/HttpError.html | 45 +- docs/compodoc/classes/MutablePgpKeyStore.html | 139 +- docs/compodoc/classes/PGPSigner.html | 130 +- docs/compodoc/classes/Settings.html | 5 +- docs/compodoc/classes/TokenRegistry.html | 23 +- docs/compodoc/classes/Transaction.html | 10 +- docs/compodoc/classes/Tx.html | 10 +- docs/compodoc/classes/TxToken.html | 10 +- docs/compodoc/classes/W3.html | 5 +- .../components/AccountDetailsComponent.html | 287 +- .../components/AccountSearchComponent.html | 78 +- .../components/AccountsComponent.html | 74 +- docs/compodoc/components/AdminComponent.html | 86 +- docs/compodoc/components/AppComponent.html | 128 +- docs/compodoc/components/AuthComponent.html | 52 +- .../components/CreateAccountComponent.html | 56 +- .../components/ErrorDialogComponent.html | 16 +- docs/compodoc/components/FooterComponent.html | 19 +- .../components/FooterStubComponent.html | 4 +- .../components/NetworkStatusComponent.html | 498 ++ .../components/OrganizationComponent.html | 32 +- docs/compodoc/components/PagesComponent.html | 10 +- .../components/SettingsComponent.html | 40 +- .../compodoc/components/SidebarComponent.html | 19 +- .../components/SidebarStubComponent.html | 4 +- .../components/TokenDetailsComponent.html | 34 +- docs/compodoc/components/TokensComponent.html | 26 +- docs/compodoc/components/TopbarComponent.html | 19 +- .../components/TopbarStubComponent.html | 4 +- .../TransactionDetailsComponent.html | 51 +- .../components/TransactionsComponent.html | 87 +- docs/compodoc/coverage.html | 26 +- docs/compodoc/dependencies.html | 4 + .../directives/MenuSelectionDirective.html | 14 +- .../directives/MenuToggleDirective.html | 14 +- .../directives/PasswordToggleDirective.html | 13 +- .../directives/RouterLinkDirectiveStub.html | 14 +- docs/compodoc/graph/dependencies.svg | 224 +- docs/compodoc/guards/AuthGuard.html | 28 +- docs/compodoc/guards/RoleGuard.html | 30 +- .../images/coverage-badge-documentation.svg | 2 +- docs/compodoc/injectables/AuthService.html | 116 +- .../injectables/BlockSyncService.html | 92 +- .../injectables/ErrorDialogService.html | 20 +- .../injectables/GlobalErrorHandler.html | 61 +- .../compodoc/injectables/LocationService.html | 35 +- docs/compodoc/injectables/LoggingService.html | 6 +- .../compodoc/injectables/RegistryService.html | 36 +- docs/compodoc/injectables/TokenService.html | 37 +- .../injectables/TransactionService.html | 128 +- docs/compodoc/injectables/UserService.html | 297 +- .../interceptors/ErrorInterceptor.html | 24 +- .../interceptors/HttpConfigInterceptor.html | 14 +- .../interceptors/LoggingInterceptor.html | 17 +- .../interceptors/MockBackendInterceptor.html | 1104 ++++- docs/compodoc/interfaces/AccountDetails.html | 98 +- docs/compodoc/interfaces/Action.html | 7 +- docs/compodoc/interfaces/AreaName.html | 7 +- docs/compodoc/interfaces/AreaType.html | 7 +- docs/compodoc/interfaces/Category.html | 7 +- docs/compodoc/interfaces/Meta.html | 98 +- docs/compodoc/interfaces/MetaResponse.html | 98 +- docs/compodoc/interfaces/MutableKeyStore.html | 134 +- docs/compodoc/interfaces/Signable.html | 96 +- docs/compodoc/interfaces/Signature-1.html | 398 ++ docs/compodoc/interfaces/Signature.html | 98 +- docs/compodoc/interfaces/Signer.html | 96 +- docs/compodoc/interfaces/Staff.html | 4 +- docs/compodoc/interfaces/Token.html | 6 +- docs/compodoc/js/menu-wc.js | 88 +- docs/compodoc/js/routes/routes_index.js | 2 +- docs/compodoc/js/search/search_index.js | 4 +- docs/compodoc/miscellaneous/variables.html | 1104 ++++- docs/compodoc/modules/AccountsModule.html | 43 +- .../modules/AccountsRoutingModule.html | 12 +- docs/compodoc/modules/AdminModule.html | 51 +- docs/compodoc/modules/AdminRoutingModule.html | 4 +- docs/compodoc/modules/AppModule.html | 55 +- .../modules/AppModule/dependencies.svg | 8 +- docs/compodoc/modules/AppRoutingModule.html | 26 +- docs/compodoc/modules/AuthModule.html | 19 +- docs/compodoc/modules/AuthRoutingModule.html | 6 +- docs/compodoc/modules/PagesModule.html | 39 +- docs/compodoc/modules/PagesRoutingModule.html | 32 +- docs/compodoc/modules/SettingsModule.html | 81 +- .../modules/SettingsModule/dependencies.svg | 46 +- .../modules/SettingsRoutingModule.html | 8 +- docs/compodoc/modules/SharedModule.html | 234 +- .../modules/SharedModule/dependencies.svg | 202 +- docs/compodoc/modules/TokensModule.html | 65 +- .../compodoc/modules/TokensRoutingModule.html | 6 +- docs/compodoc/modules/TransactionsModule.html | 69 +- .../modules/TransactionsRoutingModule.html | 4 +- docs/compodoc/overview.html | 230 +- docs/compodoc/pipes/SafePipe.html | 10 +- docs/compodoc/pipes/TokenRatioPipe.html | 4 +- docs/typedoc/assets/js/search.js | 2 +- .../app__eth_accountindex.accountindex.html | 1 - ...app__eth_token_registry.tokenregistry.html | 15 +- .../app__guards_auth_guard.authguard.html | 18 +- .../app__guards_role_guard.roleguard.html | 18 +- ...state_matcher.customerrorstatematcher.html | 16 +- ...pers_custom_validator.customvalidator.html | 1 - ...obal_error_handler.globalerrorhandler.html | 19 +- ...elpers_global_error_handler.httperror.html | 9 +- ...s_mock_backend.mockbackendinterceptor.html | 16 +- ...rs_error_interceptor.errorinterceptor.html | 11 +- ...fig_interceptor.httpconfiginterceptor.html | 13 +- ...ogging_interceptor.logginginterceptor.html | 11 +- .../app__models_settings.settings.html | 9 +- .../classes/app__models_settings.w3.html | 9 +- .../app__models_transaction.blocksbloom.html | 9 +- .../app__models_transaction.conversion.html | 9 +- .../app__models_transaction.transaction.html | 9 +- .../classes/app__models_transaction.tx.html | 9 +- .../app__models_transaction.txtoken.html | 9 +- ..._pgp_pgp_key_store.mutablepgpkeystore.html | 67 +- .../app__pgp_pgp_signer.pgpsigner.html | 45 +- ...pp__services_auth_service.authservice.html | 25 +- ...s_block_sync_service.blocksyncservice.html | 9 +- ...ror_dialog_service.errordialogservice.html | 3 +- ...ices_location_service.locationservice.html | 17 +- ...rvices_logging_service.loggingservice.html | 1 - ...ices_registry_service.registryservice.html | 7 +- ...__services_token_service.tokenservice.html | 7 +- ...ransaction_service.transactionservice.html | 11 +- ...pp__services_user_service.userservice.html | 53 +- .../app_app_component.appcomponent.html | 50 +- .../classes/app_app_module.appmodule.html | 1 - ...p_app_routing_module.approutingmodule.html | 1 - ...gle_directive.passwordtoggledirective.html | 3 +- ...app_auth_auth_component.authcomponent.html | 9 +- .../app_auth_auth_module.authmodule.html | 1 - ...auth_routing_module.authroutingmodule.html | 1 - ...ils_component.accountdetailscomponent.html | 87 +- ...arch_component.accountsearchcomponent.html | 11 +- ..._accounts_component.accountscomponent.html | 13 +- ...counts_accounts_module.accountsmodule.html | 1 - ..._routing_module.accountsroutingmodule.html | 1 - ...ount_component.createaccountcomponent.html | 5 +- ..._admin_admin_component.admincomponent.html | 15 +- ..._pages_admin_admin_module.adminmodule.html | 1 - ...min_routing_module.adminroutingmodule.html | 1 - ..._pages_pages_component.pagescomponent.html | 9 +- .../app_pages_pages_module.pagesmodule.html | 1 - ...ges_routing_module.pagesroutingmodule.html | 1 - ...ation_component.organizationcomponent.html | 5 +- ..._settings_component.settingscomponent.html | 9 +- ...ttings_settings_module.settingsmodule.html | 1 - ..._routing_module.settingsroutingmodule.html | 1 - ...tails_component.tokendetailscomponent.html | 1 - ...kens_tokens_component.tokenscomponent.html | 1 - ...ges_tokens_tokens_module.tokensmodule.html | 1 - ...ns_routing_module.tokensroutingmodule.html | 1 - ...component.transactiondetailscomponent.html | 11 +- ...tions_component.transactionscomponent.html | 35 +- ...ransactions_module.transactionsmodule.html | 1 - ...ting_module.transactionsroutingmodule.html | 1 - ...tion_directive.menuselectiondirective.html | 11 +- ..._toggle_directive.menutoggledirective.html | 11 +- .../app_shared__pipes_safe_pipe.safepipe.html | 11 +- ...pipes_token_ratio_pipe.tokenratiopipe.html | 9 +- ...dialog_component.errordialogcomponent.html | 9 +- ...oter_footer_component.footercomponent.html | 11 +- ...atus_component.networkstatuscomponent.html | 254 + ...app_shared_shared_module.sharedmodule.html | 1 - ...ar_sidebar_component.sidebarcomponent.html | 11 +- ...pbar_topbar_component.topbarcomponent.html | 11 +- .../classes/assets_js_ethtx_dist_tx.tx.html | 1 - ...tivated_route_stub.activatedroutestub.html | 1 - ...irective_stub.routerlinkdirectivestub.html | 7 +- ...hared_module_stub.footerstubcomponent.html | 1 - ...ared_module_stub.sidebarstubcomponent.html | 1 - ...hared_module_stub.topbarstubcomponent.html | 1 - ...g_token_service_stub.tokenservicestub.html | 9 +- ...n_service_stub.transactionservicestub.html | 9 +- ...ing_user_service_stub.userservicestub.html | 1 - docs/typedoc/index.html | 4 +- .../app__models_account.accountdetails.html | 1 - .../interfaces/app__models_account.meta.html | 7 +- .../app__models_account.metaresponse.html | 5 +- .../app__models_account.signature.html | 9 +- .../app__models_mappings.action.html | 1 - .../app__models_mappings.areaname.html | 1 - .../app__models_mappings.areatype.html | 1 - .../app__models_mappings.category.html | 1 - .../interfaces/app__models_staff.staff.html | 1 - .../interfaces/app__models_token.token.html | 1 - ...pp__pgp_pgp_key_store.mutablekeystore.html | 51 +- .../app__pgp_pgp_signer.signable.html | 7 +- .../app__pgp_pgp_signer.signature.html | 211 + .../app__pgp_pgp_signer.signer.html | 15 +- docs/typedoc/modules.html | 5 +- docs/typedoc/modules/app__eth.html | 1 - .../modules/app__eth_accountindex.html | 1 - .../modules/app__eth_token_registry.html | 1 - docs/typedoc/modules/app__guards.html | 1 - .../modules/app__guards_auth_guard.html | 1 - .../modules/app__guards_role_guard.html | 1 - docs/typedoc/modules/app__helpers.html | 1 - .../modules/app__helpers_array_sum.html | 1 - .../modules/app__helpers_clipboard_copy.html | 1 - ...p__helpers_custom_error_state_matcher.html | 1 - .../app__helpers_custom_validator.html | 1 - .../modules/app__helpers_export_csv.html | 1 - .../app__helpers_global_error_handler.html | 1 - .../modules/app__helpers_http_getter.html | 1 - .../modules/app__helpers_mock_backend.html | 7 +- .../modules/app__helpers_read_csv.html | 1 - .../app__helpers_schema_validation.html | 1 - docs/typedoc/modules/app__interceptors.html | 1 - .../app__interceptors_error_interceptor.html | 1 - ..._interceptors_http_config_interceptor.html | 1 - ...app__interceptors_logging_interceptor.html | 1 - docs/typedoc/modules/app__models.html | 1 - docs/typedoc/modules/app__models_account.html | 3 +- .../typedoc/modules/app__models_mappings.html | 1 - .../typedoc/modules/app__models_settings.html | 1 - docs/typedoc/modules/app__models_staff.html | 1 - docs/typedoc/modules/app__models_token.html | 1 - .../modules/app__models_transaction.html | 1 - docs/typedoc/modules/app__pgp.html | 3 +- .../modules/app__pgp_pgp_key_store.html | 1 - docs/typedoc/modules/app__pgp_pgp_signer.html | 44 +- docs/typedoc/modules/app__services.html | 1 - .../modules/app__services_auth_service.html | 1 - .../app__services_block_sync_service.html | 1 - .../app__services_error_dialog_service.html | 1 - .../app__services_location_service.html | 1 - .../app__services_logging_service.html | 1 - .../app__services_registry_service.html | 1 - .../modules/app__services_token_service.html | 1 - .../app__services_transaction_service.html | 1 - .../modules/app__services_user_service.html | 1 - docs/typedoc/modules/app_app_component.html | 1 - docs/typedoc/modules/app_app_module.html | 1 - .../modules/app_app_routing_module.html | 1 - .../typedoc/modules/app_auth__directives.html | 1 - ..._directives_password_toggle_directive.html | 1 - .../modules/app_auth_auth_component.html | 1 - .../typedoc/modules/app_auth_auth_module.html | 1 - .../modules/app_auth_auth_routing_module.html | 1 - ...unt_details_account_details_component.html | 1 - ...count_search_account_search_component.html | 1 - ...app_pages_accounts_accounts_component.html | 1 - .../app_pages_accounts_accounts_module.html | 1 - ...ages_accounts_accounts_routing_module.html | 1 - ...eate_account_create_account_component.html | 1 - .../app_pages_admin_admin_component.html | 1 - .../modules/app_pages_admin_admin_module.html | 1 - .../app_pages_admin_admin_routing_module.html | 1 - .../modules/app_pages_pages_component.html | 1 - .../modules/app_pages_pages_module.html | 1 - .../app_pages_pages_routing_module.html | 1 - ...s_organization_organization_component.html | 1 - ...app_pages_settings_settings_component.html | 1 - .../app_pages_settings_settings_module.html | 1 - ...ages_settings_settings_routing_module.html | 1 - ...token_details_token_details_component.html | 1 - .../app_pages_tokens_tokens_component.html | 1 - .../app_pages_tokens_tokens_module.html | 1 - ...pp_pages_tokens_tokens_routing_module.html | 1 - ...details_transaction_details_component.html | 1 - ...s_transactions_transactions_component.html | 1 - ...ages_transactions_transactions_module.html | 1 - ...nsactions_transactions_routing_module.html | 1 - ...__directives_menu_selection_directive.html | 1 - ...red__directives_menu_toggle_directive.html | 1 - .../modules/app_shared__pipes_safe_pipe.html | 1 - .../app_shared__pipes_token_ratio_pipe.html | 1 - ...d_error_dialog_error_dialog_component.html | 1 - .../app_shared_footer_footer_component.html | 1 - ...twork_status_network_status_component.html | 126 + .../modules/app_shared_shared_module.html | 1 - .../app_shared_sidebar_sidebar_component.html | 1 - .../app_shared_topbar_topbar_component.html | 1 - .../typedoc/modules/assets_js_ethtx_dist.html | 1 - .../modules/assets_js_ethtx_dist_hex.html | 1 - .../modules/assets_js_ethtx_dist_tx.html | 1 - .../modules/environments_environment.html | 1 - .../modules/environments_environment_dev.html | 1 - .../environments_environment_prod.html | 1 - docs/typedoc/modules/main.html | 1 - docs/typedoc/modules/polyfills.html | 1 - docs/typedoc/modules/test.html | 1 - docs/typedoc/modules/testing.html | 1 - .../modules/testing_activated_route_stub.html | 1 - .../testing_router_link_directive_stub.html | 1 - .../modules/testing_shared_module_stub.html | 1 - .../modules/testing_token_service_stub.html | 1 - .../testing_transaction_service_stub.html | 1 - .../modules/testing_user_service_stub.html | 1 - package-lock.json | 4411 ++++++++++++++++- src/app/_eth/accountIndex.ts | 6 +- src/app/_eth/token-registry.ts | 1 - src/app/_guards/auth.guard.ts | 11 +- src/app/_guards/role.guard.ts | 11 +- src/app/_helpers/array-sum.ts | 1 - .../_helpers/custom-error-state-matcher.ts | 1 - src/app/_helpers/global-error-handler.ts | 15 +- src/app/_helpers/mock-backend.ts | 438 +- src/app/_services/user.service.spec.ts | 20 - src/app/app.component.ts | 2 +- src/app/shared/_pipes/safe.pipe.spec.ts | 2 +- 309 files changed, 11327 insertions(+), 3307 deletions(-) create mode 100644 docs/compodoc/components/NetworkStatusComponent.html create mode 100644 docs/compodoc/interfaces/Signature-1.html create mode 100644 docs/typedoc/classes/app_shared_network_status_network_status_component.networkstatuscomponent.html create mode 100644 docs/typedoc/interfaces/app__pgp_pgp_signer.signature.html create mode 100644 docs/typedoc/modules/app_shared_network_status_network_status_component.html diff --git a/docs/compodoc/classes/AccountIndex.html b/docs/compodoc/classes/AccountIndex.html index 064208f..d3ea5b7 100644 --- a/docs/compodoc/classes/AccountIndex.html +++ b/docs/compodoc/classes/AccountIndex.html @@ -682,7 +682,7 @@ Returns "true" for available and "false" otherwise.

import Web3 from 'web3';
 
 // Application imports
-import {environment} from '@src/environments/environment';
+import { environment } from '@src/environments/environment';
 
 /** Fetch the account registry contract's ABI. */
 const abi: Array<any> = require('@src/assets/js/block-sync/data/AccountRegistry.json');
@@ -735,8 +735,8 @@ export class AccountIndex {
    * @returns true - If registration is successful or account had already been registered.
    */
   public async addToAccountRegistry(address: string): Promise<boolean> {
-    if (!await this.haveAccount(address)) {
-      return await this.contract.methods.add(address).send({from: this.signerAddress});
+    if (!(await this.haveAccount(address))) {
+      return await this.contract.methods.add(address).send({ from: this.signerAddress });
     }
     return true;
   }
@@ -756,7 +756,7 @@ export class AccountIndex {
    * @returns true - If the address has been registered in the accounts registry.
    */
   public async haveAccount(address: string): Promise<boolean> {
-    return await this.contract.methods.accountIndex(address).call() !== 0;
+    return (await this.contract.methods.accountIndex(address).call()) !== 0;
   }
 
   /**
diff --git a/docs/compodoc/classes/BlocksBloom.html b/docs/compodoc/classes/BlocksBloom.html
index 88a8d63..2d01143 100644
--- a/docs/compodoc/classes/BlocksBloom.html
+++ b/docs/compodoc/classes/BlocksBloom.html
@@ -260,7 +260,7 @@
 
 
     
-
import {AccountDetails} from '@app/_models/account';
+        
import { AccountDetails } from '@app/_models/account';
 
 class BlocksBloom {
   low: number;
@@ -305,13 +305,7 @@ class Conversion {
   tx: Tx;
 }
 
-export {
-  BlocksBloom,
-  TxToken,
-  Tx,
-  Transaction,
-  Conversion
-};
+export { BlocksBloom, TxToken, Tx, Transaction, Conversion };
 
diff --git a/docs/compodoc/classes/Conversion.html b/docs/compodoc/classes/Conversion.html index f0bb755..86c4342 100644 --- a/docs/compodoc/classes/Conversion.html +++ b/docs/compodoc/classes/Conversion.html @@ -320,7 +320,7 @@
-
import {AccountDetails} from '@app/_models/account';
+        
import { AccountDetails } from '@app/_models/account';
 
 class BlocksBloom {
   low: number;
@@ -365,13 +365,7 @@ class Conversion {
   tx: Tx;
 }
 
-export {
-  BlocksBloom,
-  TxToken,
-  Tx,
-  Transaction,
-  Conversion
-};
+export { BlocksBloom, TxToken, Tx, Transaction, Conversion };
 
diff --git a/docs/compodoc/classes/CustomErrorStateMatcher.html b/docs/compodoc/classes/CustomErrorStateMatcher.html index 9b06c8b..df1fc15 100644 --- a/docs/compodoc/classes/CustomErrorStateMatcher.html +++ b/docs/compodoc/classes/CustomErrorStateMatcher.html @@ -79,11 +79,6 @@ ErrorStateMatcher

-

-

Example

-

-
-

Index

@@ -142,8 +137,8 @@ - + @@ -228,15 +223,14 @@
-
import {FormControl, FormGroupDirective, NgForm} from '@angular/forms';
-import {ErrorStateMatcher} from '@angular/material/core';
+        
import { ErrorStateMatcher } from '@angular/material/core';
+import { FormControl, FormGroupDirective, NgForm } from '@angular/forms';
 
 /**
  * Custom provider that defines how form controls behave with regards to displaying error messages.
  *
- * @implements ErrorStateMatcher
  */
-export class CustomErrorStateMatcher implements ErrorStateMatcher{
+export class CustomErrorStateMatcher implements ErrorStateMatcher {
   /**
    * Checks whether an invalid input has been made and an error should be made.
    *
diff --git a/docs/compodoc/classes/CustomValidator.html b/docs/compodoc/classes/CustomValidator.html
index e89687b..3570aac 100644
--- a/docs/compodoc/classes/CustomValidator.html
+++ b/docs/compodoc/classes/CustomValidator.html
@@ -305,7 +305,7 @@
 
 
     
-
import {AbstractControl, ValidationErrors} from '@angular/forms';
+        
import { AbstractControl, ValidationErrors } from '@angular/forms';
 
 /**
  * Provides methods to perform custom validation to form inputs.
diff --git a/docs/compodoc/classes/HttpError.html b/docs/compodoc/classes/HttpError.html
index 5bdb86b..3b24712 100644
--- a/docs/compodoc/classes/HttpError.html
+++ b/docs/compodoc/classes/HttpError.html
@@ -241,12 +241,12 @@
 
 
     
-
import {HttpErrorResponse} from '@angular/common/http';
-import {ErrorHandler, Injectable} from '@angular/core';
-import {Router} from '@angular/router';
+        
import { HttpErrorResponse } from '@angular/common/http';
+import { ErrorHandler, Injectable } from '@angular/core';
+import { Router } from '@angular/router';
 
 // Application imports
-import {LoggingService} from '@app/_services/logging.service';
+import { LoggingService } from '@app/_services/logging.service';
 
 /**
  * A generalized http response error.
@@ -279,7 +279,6 @@ export class HttpError extends Error {
 export class GlobalErrorHandler extends ErrorHandler {
   /**
    * An array of sentence sections that denote warnings.
-   * @private
    */
   private sentencesForWarningLogging: Array<string> = [];
 
@@ -289,10 +288,7 @@ export class GlobalErrorHandler extends ErrorHandler {
    * @param loggingService - A service that provides logging capabilities.
    * @param router - A service that provides navigation among views and URL manipulation capabilities.
    */
-  constructor(
-    private loggingService: LoggingService,
-    private router: Router
-  ) {
+  constructor(private loggingService: LoggingService, private router: Router) {
     super();
   }
 
@@ -313,9 +309,9 @@ export class GlobalErrorHandler extends ErrorHandler {
 
     const isWarning: boolean = this.isWarning(errorTraceString);
     if (isWarning) {
-      this.loggingService.sendWarnLevelMessage(errorTraceString, {error});
+      this.loggingService.sendWarnLevelMessage(errorTraceString, { error });
     } else {
-      this.loggingService.sendErrorLevelMessage(errorTraceString, this, {error});
+      this.loggingService.sendErrorLevelMessage(errorTraceString, this, { error });
     }
 
     throw error;
@@ -326,7 +322,6 @@ export class GlobalErrorHandler extends ErrorHandler {
    *
    * @param errorTraceString - A description of the error and it's stack trace.
    * @returns true - If the error is of type warning.
-   * @private
    */
   private isWarning(errorTraceString: string): boolean {
     let isWarning: boolean = true;
@@ -352,14 +347,30 @@ export class GlobalErrorHandler extends ErrorHandler {
     const route: string = this.router.url;
     if (error instanceof HttpErrorResponse) {
       this.loggingService.sendErrorLevelMessage(
-        `There was an HTTP error on route ${route}.\n${error.message}.\nStatus code: ${(error as HttpErrorResponse).status}`,
-        this, {error});
+        `There was an HTTP error on route ${route}.\n${error.message}.\nStatus code: ${
+          (error as HttpErrorResponse).status
+        }`,
+        this,
+        { error }
+      );
     } else if (error instanceof TypeError) {
-      this.loggingService.sendErrorLevelMessage(`There was a Type error on route ${route}.\n${error.message}`, this, {error});
+      this.loggingService.sendErrorLevelMessage(
+        `There was a Type error on route ${route}.\n${error.message}`,
+        this,
+        { error }
+      );
     } else if (error instanceof Error) {
-      this.loggingService.sendErrorLevelMessage(`There was a general error on route ${route}.\n${error.message}`, this, {error});
+      this.loggingService.sendErrorLevelMessage(
+        `There was a general error on route ${route}.\n${error.message}`,
+        this,
+        { error }
+      );
     } else {
-      this.loggingService.sendErrorLevelMessage(`Nobody threw an error but something happened on route ${route}!`, this, {error});
+      this.loggingService.sendErrorLevelMessage(
+        `Nobody threw an error but something happened on route ${route}!`,
+        this,
+        { error }
+      );
     }
   }
 }
diff --git a/docs/compodoc/classes/MutablePgpKeyStore.html b/docs/compodoc/classes/MutablePgpKeyStore.html
index e104585..1b4ecc8 100644
--- a/docs/compodoc/classes/MutablePgpKeyStore.html
+++ b/docs/compodoc/classes/MutablePgpKeyStore.html
@@ -72,11 +72,6 @@
                             MutableKeyStore
             

-

-

Example

-

-
-

Index

@@ -213,8 +208,8 @@ - + @@ -252,8 +247,8 @@ - + @@ -291,8 +286,8 @@ - + @@ -330,8 +325,8 @@ - + @@ -400,8 +395,8 @@ - + @@ -470,8 +465,8 @@ - + @@ -509,8 +504,8 @@ - + @@ -575,8 +570,8 @@ - + @@ -614,8 +609,8 @@ - + @@ -653,8 +648,8 @@ - + @@ -719,8 +714,8 @@ - + @@ -785,8 +780,8 @@ - + @@ -824,8 +819,8 @@ - + @@ -890,8 +885,8 @@ - + @@ -929,8 +924,8 @@ - + @@ -970,8 +965,8 @@ - + @@ -1054,8 +1049,8 @@ - + @@ -1124,8 +1119,8 @@ - + @@ -1196,8 +1191,8 @@ - + @@ -1268,8 +1263,8 @@ - + @@ -1336,8 +1331,8 @@ - + @@ -1375,8 +1370,8 @@ - + @@ -1441,8 +1436,8 @@ - + @@ -1511,8 +1506,8 @@ - + @@ -1579,8 +1574,8 @@ - + @@ -1638,9 +1633,6 @@ import * as openpgp from 'openpgp'; const keyring = new openpgp.Keyring(); -/** - * @extends - */ interface MutableKeyStore extends KeyStore { loadKeyring(): void; importKeyPair(publicKey: any, privateKey: any): Promise<void>; @@ -1669,11 +1661,7 @@ interface MutableKeyStore extends KeyStore { sign(plainText: string): Promise<any>; } -/** - * @implements - */ -class MutablePgpKeyStore implements MutableKeyStore{ - +class MutablePgpKeyStore implements MutableKeyStore { async loadKeyring(): Promise<void> { await keyring.load(); await keyring.store(); @@ -1718,8 +1706,8 @@ class MutablePgpKeyStore implements MutableKeyStore{ async isValidKey(key): Promise<boolean> { // There is supposed to be an openpgp.readKey() method but I can't find it? - const _key = await openpgp.key.readArmored(key); - return !_key.err; + const testKey = await openpgp.key.readArmored(key); + return !testKey.err; } async isEncryptedPrivateKey(privateKey: any): Promise<boolean> { @@ -1734,8 +1722,12 @@ class MutablePgpKeyStore implements MutableKeyStore{ getFingerprint(): string { // TODO Handle multiple keys - return keyring.privateKeys && keyring.privateKeys.keys[0] && keyring.privateKeys.keys[0].keyPacket && - keyring.privateKeys.keys[0].keyPacket.fingerprint; + return ( + keyring.privateKeys && + keyring.privateKeys.keys[0] && + keyring.privateKeys.keys[0].keyPacket && + keyring.privateKeys.keys[0].keyPacket.fingerprint + ); } getKeyId(key: any): string { @@ -1744,7 +1736,11 @@ class MutablePgpKeyStore implements MutableKeyStore{ getPrivateKeyId(): string { // TODO is there a library that comes with angular for doing this? - return keyring.privateKeys && keyring.privateKeys.keys[0] && keyring.privateKeys.keys[0].getKeyId().toHex(); + return ( + keyring.privateKeys && + keyring.privateKeys.keys[0] && + keyring.privateKeys.keys[0].getKeyId().toHex() + ); } getKeysForId(keyId: string): Array<any> { @@ -1776,7 +1772,7 @@ class MutablePgpKeyStore implements MutableKeyStore{ } removePublicKey(publicKey: any): any { - const keyId = publicKey.getKeyId().toHex(); + const keyId = publicKey.getKeyId().toHex(); return keyring.publicKeys.removeForId(keyId); } @@ -1800,10 +1796,7 @@ class MutablePgpKeyStore implements MutableKeyStore{ } } -export { - MutablePgpKeyStore, - MutableKeyStore -}; +export { MutablePgpKeyStore, MutableKeyStore };
diff --git a/docs/compodoc/classes/PGPSigner.html b/docs/compodoc/classes/PGPSigner.html index b628fc0..4d19728 100644 --- a/docs/compodoc/classes/PGPSigner.html +++ b/docs/compodoc/classes/PGPSigner.html @@ -161,7 +161,7 @@ - + @@ -229,7 +229,7 @@ - + @@ -256,7 +256,7 @@ - + @@ -288,7 +288,7 @@ - + @@ -315,7 +315,7 @@ - + @@ -342,7 +342,7 @@ - + @@ -369,7 +369,7 @@ - + @@ -396,7 +396,7 @@ - + @@ -423,7 +423,7 @@ - + @@ -461,8 +461,8 @@ - + @@ -502,8 +502,8 @@ - + @@ -575,8 +575,8 @@ - + @@ -647,8 +647,8 @@ - + @@ -717,8 +717,8 @@
-
import {MutableKeyStore} from '@app/_pgp/pgp-key-store';
-import {LoggingService} from '@app/_services/logging.service';
+        
import { MutableKeyStore } from '@app/_pgp/pgp-key-store';
+import { LoggingService } from '@app/_services/logging.service';
 
 const openpgp = require('openpgp');
 
@@ -726,12 +726,12 @@ interface Signable {
   digest(): string;
 }
 
-type Signature = {
-  engine: string
-  algo: string
-  data: string
+interface Signature {
+  engine: string;
+  algo: string;
+  data: string;
   digest: string;
-};
+}
 
 interface Signer {
   onsign(signature: Signature): void;
@@ -743,7 +743,6 @@ interface Signer {
 }
 
 class PGPSigner implements Signer {
-
   engine = 'pgp';
   algo = 'sha256';
   dgst: string;
@@ -769,28 +768,35 @@ class PGPSigner implements Signer {
   }
 
   public verify(digest: string, signature: Signature): void {
-    openpgp.signature.readArmored(signature.data).then((sig) => {
-      const opts = {
-        message: openpgp.cleartext.fromText(digest),
-        publicKeys: this.keyStore.getTrustedKeys(),
-        signature: sig,
-      };
-      openpgp.verify(opts).then((v) => {
-        let i = 0;
-        for (i = 0; i < v.signatures.length; i++) {
-          const s = v.signatures[i];
-          if (s.valid) {
-            this.onverify(s);
-            return;
+    openpgp.signature
+      .readArmored(signature.data)
+      .then((sig) => {
+        const opts = {
+          message: openpgp.cleartext.fromText(digest),
+          publicKeys: this.keyStore.getTrustedKeys(),
+          signature: sig,
+        };
+        openpgp.verify(opts).then((v) => {
+          let i = 0;
+          for (i = 0; i < v.signatures.length; i++) {
+            const s = v.signatures[i];
+            if (s.valid) {
+              this.onverify(s);
+              return;
+            }
           }
-        }
-        this.loggingService.sendErrorLevelMessage(`Checked ${i} signature(s) but none valid`, this, {error: '404 Not found!'});
+          this.loggingService.sendErrorLevelMessage(
+            `Checked ${i} signature(s) but none valid`,
+            this,
+            { error: '404 Not found!' }
+          );
+          this.onverify(false);
+        });
+      })
+      .catch((e) => {
+        this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
         this.onverify(false);
       });
-    }).catch((e) => {
-      this.loggingService.sendErrorLevelMessage(e.message, this, {error: e});
-      this.onverify(false);
-    });
   }
 
   public async sign(digest: string): Promise<void> {
@@ -805,28 +811,26 @@ class PGPSigner implements Signer {
       privateKeys: [pk],
       detached: true,
     };
-    openpgp.sign(opts).then((s) => {
-      this.signature = {
-        engine: this.engine,
-        algo: this.algo,
-        data: s.signature,
-        // TODO: fix for browser later
-        digest,
-      };
-      this.onsign(this.signature);
-    }).catch((e) => {
-      this.loggingService.sendErrorLevelMessage(e.message, this, {error: e});
-      this.onsign(undefined);
-    });
+    openpgp
+      .sign(opts)
+      .then((s) => {
+        this.signature = {
+          engine: this.engine,
+          algo: this.algo,
+          data: s.signature,
+          // TODO: fix for browser later
+          digest,
+        };
+        this.onsign(this.signature);
+      })
+      .catch((e) => {
+        this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
+        this.onsign(undefined);
+      });
   }
 }
 
-export {
-  Signable,
-  Signature,
-  Signer,
-  PGPSigner
-};
+export { Signable, Signature, Signer, PGPSigner };
 
diff --git a/docs/compodoc/classes/Settings.html b/docs/compodoc/classes/Settings.html index f1ea2af..cc2127c 100644 --- a/docs/compodoc/classes/Settings.html +++ b/docs/compodoc/classes/Settings.html @@ -305,10 +305,7 @@ class W3 { provider: any; } -export { - Settings, - W3 -}; +export { Settings, W3 };
diff --git a/docs/compodoc/classes/TokenRegistry.html b/docs/compodoc/classes/TokenRegistry.html index 9cfa02d..a7ec242 100644 --- a/docs/compodoc/classes/TokenRegistry.html +++ b/docs/compodoc/classes/TokenRegistry.html @@ -151,7 +151,7 @@ Allows querying of tokens that have been registered as valid tokens in the netwo - + @@ -241,7 +241,7 @@ Allows querying of tokens that have been registered as valid tokens in the netwo - + @@ -274,7 +274,7 @@ Allows querying of tokens that have been registered as valid tokens in the netwo - + @@ -307,7 +307,7 @@ Allows querying of tokens that have been registered as valid tokens in the netwo - + @@ -352,8 +352,8 @@ Allows querying of tokens that have been registered as valid tokens in the netwo - + @@ -444,8 +444,8 @@ Allows querying of tokens that have been registered as valid tokens in the netwo - + @@ -536,8 +536,8 @@ Allows querying of tokens that have been registered as valid tokens in the netwo - + @@ -583,8 +583,7 @@ Allows querying of tokens that have been registered as valid tokens in the netwo
import Web3 from 'web3';
 
 // Application imports
-import {environment} from '@src/environments/environment';
-
+import { environment } from '@src/environments/environment';
 
 /** Fetch the token registry contract's ABI. */
 const abi: Array<any> = require('@src/assets/js/block-sync/data/TokenUniqueSymbolIndex.json');
diff --git a/docs/compodoc/classes/Transaction.html b/docs/compodoc/classes/Transaction.html
index d233b82..8e57e93 100644
--- a/docs/compodoc/classes/Transaction.html
+++ b/docs/compodoc/classes/Transaction.html
@@ -352,7 +352,7 @@
 
 
     
-
import {AccountDetails} from '@app/_models/account';
+        
import { AccountDetails } from '@app/_models/account';
 
 class BlocksBloom {
   low: number;
@@ -397,13 +397,7 @@ class Conversion {
   tx: Tx;
 }
 
-export {
-  BlocksBloom,
-  TxToken,
-  Tx,
-  Transaction,
-  Conversion
-};
+export { BlocksBloom, TxToken, Tx, Transaction, Conversion };
 
diff --git a/docs/compodoc/classes/Tx.html b/docs/compodoc/classes/Tx.html index 08bc091..02f5e9a 100644 --- a/docs/compodoc/classes/Tx.html +++ b/docs/compodoc/classes/Tx.html @@ -260,7 +260,7 @@
-
import {AccountDetails} from '@app/_models/account';
+        
import { AccountDetails } from '@app/_models/account';
 
 class BlocksBloom {
   low: number;
@@ -305,13 +305,7 @@ class Conversion {
   tx: Tx;
 }
 
-export {
-  BlocksBloom,
-  TxToken,
-  Tx,
-  Transaction,
-  Conversion
-};
+export { BlocksBloom, TxToken, Tx, Transaction, Conversion };
 
diff --git a/docs/compodoc/classes/TxToken.html b/docs/compodoc/classes/TxToken.html index fdf0bd9..79502a2 100644 --- a/docs/compodoc/classes/TxToken.html +++ b/docs/compodoc/classes/TxToken.html @@ -200,7 +200,7 @@
-
import {AccountDetails} from '@app/_models/account';
+        
import { AccountDetails } from '@app/_models/account';
 
 class BlocksBloom {
   low: number;
@@ -245,13 +245,7 @@ class Conversion {
   tx: Tx;
 }
 
-export {
-  BlocksBloom,
-  TxToken,
-  Tx,
-  Transaction,
-  Conversion
-};
+export { BlocksBloom, TxToken, Tx, Transaction, Conversion };
 
diff --git a/docs/compodoc/classes/W3.html b/docs/compodoc/classes/W3.html index 1dff227..02a0db9 100644 --- a/docs/compodoc/classes/W3.html +++ b/docs/compodoc/classes/W3.html @@ -189,10 +189,7 @@ class W3 { provider: any; } -export { - Settings, - W3 -}; +export { Settings, W3 };
diff --git a/docs/compodoc/components/AccountDetailsComponent.html b/docs/compodoc/components/AccountDetailsComponent.html index 091ca8e..77bca29 100644 --- a/docs/compodoc/components/AccountDetailsComponent.html +++ b/docs/compodoc/components/AccountDetailsComponent.html @@ -306,7 +306,7 @@ - + @@ -495,8 +495,8 @@ - + @@ -534,8 +534,8 @@ - + @@ -604,8 +604,8 @@ - + @@ -674,8 +674,8 @@ - + @@ -756,8 +756,8 @@ - + @@ -795,8 +795,8 @@ - + @@ -834,8 +834,8 @@ - + @@ -873,8 +873,8 @@ - + @@ -914,8 +914,8 @@ - + @@ -953,8 +953,8 @@ - + @@ -1019,8 +1019,8 @@ - + @@ -1089,7 +1089,7 @@ - + @@ -1116,7 +1116,7 @@ - + @@ -1143,7 +1143,7 @@ - + @@ -1175,7 +1175,7 @@ - + @@ -1202,7 +1202,7 @@ - + @@ -1234,7 +1234,7 @@ - + @@ -1261,7 +1261,7 @@ - + @@ -1288,7 +1288,7 @@ - + @@ -1315,7 +1315,7 @@ - + @@ -1342,7 +1342,7 @@ - + @@ -1369,7 +1369,7 @@ - + @@ -1396,7 +1396,7 @@ - + @@ -1428,7 +1428,7 @@ - + @@ -1460,7 +1460,7 @@ - + @@ -1487,7 +1487,7 @@ - + @@ -1514,7 +1514,7 @@ - + @@ -1541,7 +1541,7 @@ - + @@ -1573,7 +1573,7 @@ - + @@ -1605,7 +1605,7 @@ - + @@ -1637,7 +1637,7 @@ - + @@ -1669,7 +1669,7 @@ - + @@ -1696,7 +1696,7 @@ - + @@ -1732,7 +1732,7 @@ - + @@ -1768,7 +1768,7 @@ - + @@ -1795,7 +1795,7 @@ - + @@ -1827,7 +1827,7 @@ - + @@ -1859,7 +1859,7 @@ - + @@ -1891,7 +1891,7 @@ - + @@ -1927,7 +1927,7 @@ - + @@ -1963,7 +1963,7 @@ - + @@ -1992,7 +1992,7 @@ - + @@ -2003,40 +2003,53 @@
-
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, ViewChild} from '@angular/core';
-import {MatTableDataSource} from '@angular/material/table';
-import {MatPaginator} from '@angular/material/paginator';
-import {MatSort} from '@angular/material/sort';
-import {BlockSyncService, LocationService, LoggingService, TokenService, TransactionService, UserService} from '@app/_services';
-import {ActivatedRoute, Params, Router} from '@angular/router';
-import {first} from 'rxjs/operators';
-import {FormBuilder, FormGroup, Validators} from '@angular/forms';
-import {copyToClipboard, CustomErrorStateMatcher, exportCsv} from '@app/_helpers';
-import {MatSnackBar} from '@angular/material/snack-bar';
-import {add0x, strip0x} from '@src/assets/js/ethtx/dist/hex';
-import {environment} from '@src/environments/environment';
-import {AccountDetails, AreaName, AreaType, Category, Transaction} from '@app/_models';
+        
import {
+  ChangeDetectionStrategy,
+  ChangeDetectorRef,
+  Component,
+  OnInit,
+  ViewChild,
+} from '@angular/core';
+import { MatTableDataSource } from '@angular/material/table';
+import { MatPaginator } from '@angular/material/paginator';
+import { MatSort } from '@angular/material/sort';
+import {
+  BlockSyncService,
+  LocationService,
+  LoggingService,
+  TokenService,
+  TransactionService,
+  UserService,
+} from '@app/_services';
+import { ActivatedRoute, Params, Router } from '@angular/router';
+import { first } from 'rxjs/operators';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { copyToClipboard, CustomErrorStateMatcher, exportCsv } from '@app/_helpers';
+import { MatSnackBar } from '@angular/material/snack-bar';
+import { add0x, strip0x } from '@src/assets/js/ethtx/dist/hex';
+import { environment } from '@src/environments/environment';
+import { AccountDetails, AreaName, AreaType, Category, Transaction } from '@app/_models';
 
 @Component({
   selector: 'app-account-details',
   templateUrl: './account-details.component.html',
   styleUrls: ['./account-details.component.scss'],
-  changeDetection: ChangeDetectionStrategy.OnPush
+  changeDetection: ChangeDetectionStrategy.OnPush,
 })
 export class AccountDetailsComponent implements OnInit {
   transactionsDataSource: MatTableDataSource<any>;
   transactionsDisplayedColumns: Array<string> = ['sender', 'recipient', 'value', 'created', 'type'];
   transactionsDefaultPageSize: number = 10;
   transactionsPageSizeOptions: Array<number> = [10, 20, 50, 100];
-  @ViewChild('TransactionTablePaginator', {static: true}) transactionTablePaginator: MatPaginator;
-  @ViewChild('TransactionTableSort', {static: true}) transactionTableSort: MatSort;
+  @ViewChild('TransactionTablePaginator', { static: true }) transactionTablePaginator: MatPaginator;
+  @ViewChild('TransactionTableSort', { static: true }) transactionTableSort: MatSort;
 
   userDataSource: MatTableDataSource<any>;
   userDisplayedColumns: Array<string> = ['name', 'phone', 'created', 'balance', 'location'];
   usersDefaultPageSize: number = 10;
   usersPageSizeOptions: Array<number> = [10, 20, 50, 100];
-  @ViewChild('UserTablePaginator', {static: true}) userTablePaginator: MatPaginator;
-  @ViewChild('UserTableSort', {static: true}) userTableSort: MatSort;
+  @ViewChild('UserTablePaginator', { static: true }) userTablePaginator: MatPaginator;
+  @ViewChild('UserTableSort', { static: true }) userTableSort: MatSort;
 
   accountInfoForm: FormGroup;
   account: AccountDetails;
@@ -2068,7 +2081,7 @@ export class AccountDetailsComponent implements OnInit {
     private loggingService: LoggingService,
     private blockSyncService: BlockSyncService,
     private cdr: ChangeDetectorRef,
-    private snackBar: MatSnackBar,
+    private snackBar: MatSnackBar
   ) {
     this.accountInfoForm = this.formBuilder.group({
       name: ['', Validators.required],
@@ -2084,49 +2097,70 @@ export class AccountDetailsComponent implements OnInit {
     });
     this.route.paramMap.subscribe(async (params: Params) => {
       this.accountAddress = add0x(params.get('id'));
-      this.bloxbergLink = 'https://blockexplorer.bloxberg.org/address/' + this.accountAddress + '/transactions';
-      (await this.userService.getAccountByAddress(this.accountAddress, 100)).subscribe(async res => {
-        if (res !== undefined) {
-          this.account = res;
-          this.cdr.detectChanges();
-          this.loggingService.sendInfoLevelMessage(this.account);
-          // this.userService.getAccountStatus(this.account.vcard?.tel[0].value).pipe(first())
-          //   .subscribe(response => this.accountStatus = response);
-          this.accountInfoForm.patchValue({
-            name: this.account.vcard?.fn[0].value,
-            phoneNumber: this.account.vcard?.tel[0].value,
-            age: this.account.age,
-            type: this.account.type,
-            bio: this.account.products,
-            gender: this.account.gender,
-            businessCategory: this.account.category,
-            userLocation: this.account.location.area_name,
-            location: this.account.location.area,
-            locationType: this.account.location.area_type,
-          });
-        } else {
-          alert('Account not found!');
+      this.bloxbergLink =
+        'https://blockexplorer.bloxberg.org/address/' + this.accountAddress + '/transactions';
+      (await this.userService.getAccountByAddress(this.accountAddress, 100)).subscribe(
+        async (res) => {
+          if (res !== undefined) {
+            this.account = res;
+            this.cdr.detectChanges();
+            this.loggingService.sendInfoLevelMessage(this.account);
+            // this.userService.getAccountStatus(this.account.vcard?.tel[0].value).pipe(first())
+            //   .subscribe(response => this.accountStatus = response);
+            this.accountInfoForm.patchValue({
+              name: this.account.vcard?.fn[0].value,
+              phoneNumber: this.account.vcard?.tel[0].value,
+              age: this.account.age,
+              type: this.account.type,
+              bio: this.account.products,
+              gender: this.account.gender,
+              businessCategory: this.account.category,
+              userLocation: this.account.location.area_name,
+              location: this.account.location.area,
+              locationType: this.account.location.area_type,
+            });
+          } else {
+            alert('Account not found!');
+          }
         }
-      });
+      );
       this.blockSyncService.blockSync(this.accountAddress);
     });
-    this.userService.getCategories().pipe(first()).subscribe(res => this.categories = res);
-    this.locationService.getAreaNames().pipe(first()).subscribe(res => this.areaNames = res);
-    this.locationService.getAreaTypes().pipe(first()).subscribe(res => this.areaTypes = res);
-    this.userService.getAccountTypes().pipe(first()).subscribe(res => this.accountTypes = res);
-    this.userService.getTransactionTypes().pipe(first()).subscribe(res => this.transactionsTypes = res);
-    this.userService.getGenders().pipe(first()).subscribe(res => this.genders = res);
+    this.userService
+      .getCategories()
+      .pipe(first())
+      .subscribe((res) => (this.categories = res));
+    this.locationService
+      .getAreaNames()
+      .pipe(first())
+      .subscribe((res) => (this.areaNames = res));
+    this.locationService
+      .getAreaTypes()
+      .pipe(first())
+      .subscribe((res) => (this.areaTypes = res));
+    this.userService
+      .getAccountTypes()
+      .pipe(first())
+      .subscribe((res) => (this.accountTypes = res));
+    this.userService
+      .getTransactionTypes()
+      .pipe(first())
+      .subscribe((res) => (this.transactionsTypes = res));
+    this.userService
+      .getGenders()
+      .pipe(first())
+      .subscribe((res) => (this.genders = res));
   }
 
   ngOnInit(): void {
-    this.userService.accountsSubject.subscribe(accounts => {
+    this.userService.accountsSubject.subscribe((accounts) => {
       this.userDataSource = new MatTableDataSource<any>(accounts);
       this.userDataSource.paginator = this.userTablePaginator;
       this.userDataSource.sort = this.userTableSort;
       this.accounts = accounts;
     });
 
-    this.transactionService.transactionsSubject.subscribe(transactions => {
+    this.transactionService.transactionsSubject.subscribe((transactions) => {
       this.transactionsDataSource = new MatTableDataSource<any>(transactions);
       this.transactionsDataSource.paginator = this.transactionTablePaginator;
       this.transactionsDataSource.sort = this.transactionTableSort;
@@ -2147,14 +2181,20 @@ export class AccountDetailsComponent implements OnInit {
   }
 
   viewAccount(account): void {
-    this.router.navigateByUrl(`/accounts/${strip0x(account.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0])}`);
+    this.router.navigateByUrl(
+      `/accounts/${strip0x(account.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0])}`
+    );
   }
 
-  get accountInfoFormStub(): any { return this.accountInfoForm.controls; }
+  get accountInfoFormStub(): any {
+    return this.accountInfoForm.controls;
+  }
 
   async saveInfo(): Promise<void> {
     this.submitted = true;
-    if (this.accountInfoForm.invalid || !confirm('Change user\'s profile information?')) { return; }
+    if (this.accountInfoForm.invalid || !confirm(`Change user's profile information?`)) {
+      return;
+    }
     const accountKey = await this.userService.changeAccountInfo(
       this.accountAddress,
       this.accountInfoFormStub.name.value,
@@ -2173,31 +2213,40 @@ export class AccountDetailsComponent implements OnInit {
 
   filterAccounts(): void {
     if (this.accountsType === 'all') {
-      this.userService.accountsSubject.subscribe(accounts => {
+      this.userService.accountsSubject.subscribe((accounts) => {
         this.userDataSource.data = accounts;
         this.accounts = accounts;
       });
     } else {
-      this.userDataSource.data = this.accounts.filter(account => account.type === this.accountsType);
+      this.userDataSource.data = this.accounts.filter(
+        (account) => account.type === this.accountsType
+      );
     }
   }
 
   filterTransactions(): void {
     if (this.transactionsType === 'all') {
-      this.transactionService.transactionsSubject.subscribe(transactions => {
+      this.transactionService.transactionsSubject.subscribe((transactions) => {
         this.transactionsDataSource.data = transactions;
         this.transactions = transactions;
       });
     } else {
-      this.transactionsDataSource.data = this.transactions.filter(transaction => transaction.type === this.transactionsType);
+      this.transactionsDataSource.data = this.transactions.filter(
+        (transaction) => transaction.type === this.transactionsType
+      );
     }
   }
 
   resetPin(): void {
-    if (!confirm('Reset user\'s pin?')) { return; }
-    this.userService.resetPin(this.account.vcard.tel[0].value).pipe(first()).subscribe(res => {
-      this.loggingService.sendInfoLevelMessage(`Response: ${res}`);
-    });
+    if (!confirm(`Reset user's pin?`)) {
+      return;
+    }
+    this.userService
+      .resetPin(this.account.vcard.tel[0].value)
+      .pipe(first())
+      .subscribe((res) => {
+        this.loggingService.sendInfoLevelMessage(`Response: ${res}`);
+      });
   }
 
   downloadCsv(data: any, filename: string): void {
@@ -2206,7 +2255,9 @@ export class AccountDetailsComponent implements OnInit {
 
   copyAddress(): void {
     if (copyToClipboard(this.accountAddress)) {
-      this.snackBar.open(this.accountAddress + ' copied successfully!', 'Close', { duration: 3000 });
+      this.snackBar.open(this.accountAddress + ' copied successfully!', 'Close', {
+        duration: 3000,
+      });
     }
   }
 }
@@ -2620,8 +2671,8 @@ export class AccountDetailsComponent implements OnInit {
 
 
 
diff --git a/docs/compodoc/components/AccountSearchComponent.html b/docs/compodoc/components/AccountSearchComponent.html
index c54182f..fdd21c8 100644
--- a/docs/compodoc/components/AccountSearchComponent.html
+++ b/docs/compodoc/components/AccountSearchComponent.html
@@ -366,8 +366,8 @@
 
             
                 
-                    
+                    
                 
             
 
@@ -405,8 +405,8 @@
 
             
                 
-                    
+                    
                 
             
 
@@ -446,8 +446,8 @@
 
             
                 
-                    
+                    
                 
             
 
@@ -818,7 +818,7 @@
                 
                             
                                 
-                                    
+                                    
                                 
                             
 
@@ -840,7 +840,7 @@
                 
                             
                                 
-                                    
+                                    
                                 
                             
 
@@ -852,18 +852,18 @@
 
     
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
-import {FormBuilder, FormGroup, Validators} from '@angular/forms';
-import {CustomErrorStateMatcher} from '@app/_helpers';
-import {UserService} from '@app/_services';
-import {Router} from '@angular/router';
-import {strip0x} from '@src/assets/js/ethtx/dist/hex';
-import {environment} from '@src/environments/environment';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { CustomErrorStateMatcher } from '@app/_helpers';
+import { UserService } from '@app/_services';
+import { Router } from '@angular/router';
+import { strip0x } from '@src/assets/js/ethtx/dist/hex';
+import { environment } from '@src/environments/environment';
 
 @Component({
   selector: 'app-account-search',
   templateUrl: './account-search.component.html',
   styleUrls: ['./account-search.component.scss'],
-  changeDetection: ChangeDetectionStrategy.OnPush
+  changeDetection: ChangeDetectionStrategy.OnPush,
 })
 export class AccountSearchComponent implements OnInit {
   nameSearchForm: FormGroup;
@@ -880,8 +880,8 @@ export class AccountSearchComponent implements OnInit {
   constructor(
     private formBuilder: FormBuilder,
     private userService: UserService,
-    private router: Router,
-  ) { }
+    private router: Router
+  ) {}
 
   ngOnInit(): void {
     this.nameSearchForm = this.formBuilder.group({
@@ -895,13 +895,21 @@ export class AccountSearchComponent implements OnInit {
     });
   }
 
-  get nameSearchFormStub(): any { return this.nameSearchForm.controls; }
-  get phoneSearchFormStub(): any { return this.phoneSearchForm.controls; }
-  get addressSearchFormStub(): any { return this.addressSearchForm.controls; }
+  get nameSearchFormStub(): any {
+    return this.nameSearchForm.controls;
+  }
+  get phoneSearchFormStub(): any {
+    return this.phoneSearchForm.controls;
+  }
+  get addressSearchFormStub(): any {
+    return this.addressSearchForm.controls;
+  }
 
   onNameSearch(): void {
     this.nameSearchSubmitted = true;
-    if (this.nameSearchForm.invalid) { return; }
+    if (this.nameSearchForm.invalid) {
+      return;
+    }
     this.nameSearchLoading = true;
     this.userService.searchAccountByName(this.nameSearchFormStub.name.value);
     this.nameSearchLoading = false;
@@ -909,11 +917,17 @@ export class AccountSearchComponent implements OnInit {
 
   async onPhoneSearch(): Promise<void> {
     this.phoneSearchSubmitted = true;
-    if (this.phoneSearchForm.invalid) { return; }
+    if (this.phoneSearchForm.invalid) {
+      return;
+    }
     this.phoneSearchLoading = true;
-    (await this.userService.getAccountByPhone(this.phoneSearchFormStub.phoneNumber.value, 100)).subscribe(async res => {
+    (
+      await this.userService.getAccountByPhone(this.phoneSearchFormStub.phoneNumber.value, 100)
+    ).subscribe(async (res) => {
       if (res !== undefined) {
-        await this.router.navigateByUrl(`/accounts/${strip0x(res.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0])}`);
+        await this.router.navigateByUrl(
+          `/accounts/${strip0x(res.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0])}`
+        );
       } else {
         alert('Account not found!');
       }
@@ -923,11 +937,17 @@ export class AccountSearchComponent implements OnInit {
 
   async onAddressSearch(): Promise<void> {
     this.addressSearchSubmitted = true;
-    if (this.addressSearchForm.invalid) { return; }
+    if (this.addressSearchForm.invalid) {
+      return;
+    }
     this.addressSearchLoading = true;
-    (await this.userService.getAccountByAddress(this.addressSearchFormStub.address.value, 100)).subscribe(async res => {
+    (
+      await this.userService.getAccountByAddress(this.addressSearchFormStub.address.value, 100)
+    ).subscribe(async (res) => {
       if (res !== undefined) {
-        await this.router.navigateByUrl(`/accounts/${strip0x(res.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0])}`);
+        await this.router.navigateByUrl(
+          `/accounts/${strip0x(res.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0])}`
+        );
       } else {
         alert('Account not found!');
       }
@@ -1034,8 +1054,8 @@ export class AccountSearchComponent implements OnInit {
 
 
 
diff --git a/docs/compodoc/components/AccountsComponent.html b/docs/compodoc/components/AccountsComponent.html
index 053e4f0..41235ae 100644
--- a/docs/compodoc/components/AccountsComponent.html
+++ b/docs/compodoc/components/AccountsComponent.html
@@ -307,8 +307,8 @@
 
             
                 
-                    
+                    
                 
             
 
@@ -377,8 +377,8 @@
 
             
                 
-                    
+                    
                 
             
 
@@ -416,8 +416,8 @@
 
             
                 
-                    
+                    
                 
             
 
@@ -455,8 +455,8 @@
 
             
                 
-                    
+                    
                 
             
 
@@ -494,8 +494,8 @@
 
             
                 
-                    
+                    
                 
             
 
@@ -535,8 +535,8 @@
 
             
                 
-                    
+                    
                 
             
 
@@ -877,23 +877,23 @@
 
 
     
-
import {ChangeDetectionStrategy, Component, OnInit, ViewChild} from '@angular/core';
-import {MatTableDataSource} from '@angular/material/table';
-import {MatPaginator} from '@angular/material/paginator';
-import {MatSort} from '@angular/material/sort';
-import {LoggingService, UserService} from '@app/_services';
-import {Router} from '@angular/router';
-import {exportCsv} from '@app/_helpers';
-import {strip0x} from '@src/assets/js/ethtx/dist/hex';
-import {first} from 'rxjs/operators';
-import {environment} from '@src/environments/environment';
-import {AccountDetails} from '@app/_models';
+        
import { ChangeDetectionStrategy, Component, OnInit, ViewChild } from '@angular/core';
+import { MatTableDataSource } from '@angular/material/table';
+import { MatPaginator } from '@angular/material/paginator';
+import { MatSort } from '@angular/material/sort';
+import { LoggingService, UserService } from '@app/_services';
+import { Router } from '@angular/router';
+import { exportCsv } from '@app/_helpers';
+import { strip0x } from '@src/assets/js/ethtx/dist/hex';
+import { first } from 'rxjs/operators';
+import { environment } from '@src/environments/environment';
+import { AccountDetails } from '@app/_models';
 
 @Component({
   selector: 'app-accounts',
   templateUrl: './accounts.component.html',
   styleUrls: ['./accounts.component.scss'],
-  changeDetection: ChangeDetectionStrategy.OnPush
+  changeDetection: ChangeDetectionStrategy.OnPush,
 })
 export class AccountsComponent implements OnInit {
   dataSource: MatTableDataSource<any>;
@@ -911,21 +911,23 @@ export class AccountsComponent implements OnInit {
     private userService: UserService,
     private loggingService: LoggingService,
     private router: Router
-  )
-  {
+  ) {
     (async () => {
       try {
-          // TODO it feels like this should be in the onInit handler
+        // TODO it feels like this should be in the onInit handler
         await this.userService.loadAccounts(100);
       } catch (error) {
-        this.loggingService.sendErrorLevelMessage('Failed to load accounts', this, {error});
+        this.loggingService.sendErrorLevelMessage('Failed to load accounts', this, { error });
       }
     })();
-    this.userService.getAccountTypes().pipe(first()).subscribe(res => this.accountTypes = res);
+    this.userService
+      .getAccountTypes()
+      .pipe(first())
+      .subscribe((res) => (this.accountTypes = res));
   }
 
   ngOnInit(): void {
-    this.userService.accountsSubject.subscribe(accounts => {
+    this.userService.accountsSubject.subscribe((accounts) => {
       this.dataSource = new MatTableDataSource<any>(accounts);
       this.dataSource.paginator = this.paginator;
       this.dataSource.sort = this.sort;
@@ -938,17 +940,19 @@ export class AccountsComponent implements OnInit {
   }
 
   async viewAccount(account): Promise<void> {
-    await this.router.navigateByUrl(`/accounts/${strip0x(account.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0])}`);
+    await this.router.navigateByUrl(
+      `/accounts/${strip0x(account.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0])}`
+    );
   }
 
   filterAccounts(): void {
     if (this.accountsType === 'all') {
-      this.userService.accountsSubject.subscribe(accounts => {
+      this.userService.accountsSubject.subscribe((accounts) => {
         this.dataSource.data = accounts;
         this.accounts = accounts;
       });
     } else {
-      this.dataSource.data = this.accounts.filter(account => account.type === this.accountsType);
+      this.dataSource.data = this.accounts.filter((account) => account.type === this.accountsType);
     }
   }
 
@@ -1089,8 +1093,8 @@ export class AccountsComponent implements OnInit {
 
 
 
diff --git a/docs/compodoc/components/AdminComponent.html b/docs/compodoc/components/AdminComponent.html
index 8eecfda..925a4b0 100644
--- a/docs/compodoc/components/AdminComponent.html
+++ b/docs/compodoc/components/AdminComponent.html
@@ -288,8 +288,8 @@
 
             
                 
-                    
+                    
                 
             
 
@@ -358,8 +358,8 @@
 
             
                 
-                    
+                    
                 
             
 
@@ -428,8 +428,8 @@
 
             
                 
-                    
+                    
                 
             
 
@@ -498,8 +498,8 @@
 
             
                 
-                    
+                    
                 
             
 
@@ -568,8 +568,8 @@
 
             
                 
-                    
+                    
                 
             
 
@@ -607,8 +607,8 @@
 
             
                 
-                    
+                    
                 
             
 
@@ -673,8 +673,8 @@
 
             
                 
-                    
+                    
                 
             
 
@@ -887,15 +887,15 @@
 
 
     
-
import {ChangeDetectionStrategy, Component, OnInit, ViewChild} from '@angular/core';
-import {MatTableDataSource} from '@angular/material/table';
-import {MatPaginator} from '@angular/material/paginator';
-import {MatSort} from '@angular/material/sort';
-import {LoggingService, UserService} from '@app/_services';
-import {animate, state, style, transition, trigger} from '@angular/animations';
-import {first} from 'rxjs/operators';
-import {exportCsv} from '@app/_helpers';
-import {Action} from '../../_models';
+        
import { ChangeDetectionStrategy, Component, OnInit, ViewChild } from '@angular/core';
+import { MatTableDataSource } from '@angular/material/table';
+import { MatPaginator } from '@angular/material/paginator';
+import { MatSort } from '@angular/material/sort';
+import { LoggingService, UserService } from '@app/_services';
+import { animate, state, style, transition, trigger } from '@angular/animations';
+import { first } from 'rxjs/operators';
+import { exportCsv } from '@app/_helpers';
+import { Action } from '../../_models';
 
 @Component({
   selector: 'app-admin',
@@ -904,11 +904,11 @@ import {Action} from '../../_models';
   changeDetection: ChangeDetectionStrategy.OnPush,
   animations: [
     trigger('detailExpand', [
-      state('collapsed', style({height: '0px', minHeight: 0, visibility: 'hidden'})),
-      state('expanded', style({height: '*', visibility: 'visible'})),
+      state('collapsed', style({ height: '0px', minHeight: 0, visibility: 'hidden' })),
+      state('expanded', style({ height: '*', visibility: 'visible' })),
       transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
-    ])
-  ]
+    ]),
+  ],
 })
 export class AdminComponent implements OnInit {
   dataSource: MatTableDataSource<any>;
@@ -919,12 +919,9 @@ export class AdminComponent implements OnInit {
   @ViewChild(MatPaginator) paginator: MatPaginator;
   @ViewChild(MatSort) sort: MatSort;
 
-  constructor(
-    private userService: UserService,
-    private loggingService: LoggingService
-  ) {
+  constructor(private userService: UserService, private loggingService: LoggingService) {
     this.userService.getActions();
-    this.userService.actionsSubject.subscribe(actions => {
+    this.userService.actionsSubject.subscribe((actions) => {
       this.dataSource = new MatTableDataSource<any>(actions);
       this.dataSource.paginator = this.paginator;
       this.dataSource.sort = this.sort;
@@ -932,8 +929,7 @@ export class AdminComponent implements OnInit {
     });
   }
 
-  ngOnInit(): void {
-  }
+  ngOnInit(): void {}
 
   doFilter(value: string): void {
     this.dataSource.filter = value.trim().toLocaleLowerCase();
@@ -944,14 +940,24 @@ export class AdminComponent implements OnInit {
   }
 
   approveAction(action: any): void {
-    if (!confirm('Approve action?')) { return; }
-    this.userService.approveAction(action.id).pipe(first()).subscribe(res => this.loggingService.sendInfoLevelMessage(res));
+    if (!confirm('Approve action?')) {
+      return;
+    }
+    this.userService
+      .approveAction(action.id)
+      .pipe(first())
+      .subscribe((res) => this.loggingService.sendInfoLevelMessage(res));
     this.userService.getActions();
   }
 
   disapproveAction(action: any): void {
-    if (!confirm('Disapprove action?')) { return; }
-    this.userService.revokeAction(action.id).pipe(first()).subscribe(res => this.loggingService.sendInfoLevelMessage(res));
+    if (!confirm('Disapprove action?')) {
+      return;
+    }
+    this.userService
+      .revokeAction(action.id)
+      .pipe(first())
+      .subscribe((res) => this.loggingService.sendInfoLevelMessage(res));
     this.userService.getActions();
   }
 
@@ -1111,8 +1117,8 @@ export class AdminComponent implements OnInit {
 
 
 
diff --git a/docs/compodoc/components/AppComponent.html b/docs/compodoc/components/AppComponent.html
index 1a8420e..6018d5e 100644
--- a/docs/compodoc/components/AppComponent.html
+++ b/docs/compodoc/components/AppComponent.html
@@ -66,6 +66,12 @@
 
 
 
+    

+

Implements

+

+

+ OnInit +

@@ -151,6 +157,9 @@
@@ -299,8 +320,8 @@ - + @@ -334,8 +355,8 @@ - + @@ -348,6 +369,45 @@

Methods

+ + + + + + + + + + + + + + + + + + + +
+ + + + ngOnInit + + + +
+ngOnInit() +
+ +
+ +
+ Returns : void + +
+
@@ -370,8 +430,8 @@ @@ -445,7 +505,7 @@ @@ -477,7 +537,7 @@ @@ -509,7 +569,7 @@ @@ -541,7 +601,7 @@ @@ -554,17 +614,23 @@
-
import {ChangeDetectionStrategy, Component, HostListener} from '@angular/core';
-import {AuthService, ErrorDialogService, LoggingService, TransactionService} from '@app/_services';
-import {catchError} from 'rxjs/operators';
+        
import { ChangeDetectionStrategy, Component, HostListener, OnInit } from '@angular/core';
+import {
+  AuthService,
+  ErrorDialogService,
+  LoggingService,
+  TransactionService,
+} from '@app/_services';
+import { catchError } from 'rxjs/operators';
+import { SwUpdate } from '@angular/service-worker';
 
 @Component({
   selector: 'app-root',
   templateUrl: './app.component.html',
   styleUrls: ['./app.component.scss'],
-  changeDetection: ChangeDetectionStrategy.OnPush
+  changeDetection: ChangeDetectionStrategy.OnPush,
 })
-export class AppComponent {
+export class AppComponent implements OnInit {
   title = 'CICADA';
   readyStateTarget: number = 3;
   readyState: number = 0;
@@ -574,7 +640,8 @@ export class AppComponent {
     private authService: AuthService,
     private transactionService: TransactionService,
     private loggingService: LoggingService,
-    private errorDialogService: ErrorDialogService
+    private errorDialogService: ErrorDialogService,
+    private swUpdate: SwUpdate
   ) {
     (async () => {
       try {
@@ -587,14 +654,26 @@ export class AppComponent {
         const publicKeys = await this.authService.getPublicKeys();
         await this.authService.mutableKeyStore.importPublicKey(publicKeys);
       } catch (error) {
-        this.errorDialogService.openDialog({message: 'Trusted keys endpoint can\'t be reached. Please try again later.'});
+        this.errorDialogService.openDialog({
+          message: 'Trusted keys endpoint cannot be reached. Please try again later.',
+        });
         // TODO do something to halt user progress...show a sad cicada page 🦗?
       }
     })();
-    this.mediaQuery.addListener(this.onResize);
+    this.mediaQuery.addEventListener('change', this.onResize);
     this.onResize(this.mediaQuery);
   }
 
+  ngOnInit(): void {
+    if (!this.swUpdate.isEnabled) {
+      this.swUpdate.available.subscribe(() => {
+        if (confirm('New Version available. Load New Version?')) {
+          window.location.reload();
+        }
+      });
+    }
+  }
+
   // Load resize
   onResize(e): void {
     const sidebar: HTMLElement = document.getElementById('sidebar');
@@ -636,7 +715,8 @@ export class AppComponent {
     
-
<router-outlet (activate)="onResize(mediaQuery)"></router-outlet>
+        
<app-network-status></app-network-status>
+<router-outlet (activate)="onResize(mediaQuery)"></router-outlet>
 
@@ -672,9 +752,9 @@ export class AppComponent { diff --git a/docs/compodoc/components/AuthComponent.html b/docs/compodoc/components/AuthComponent.html index 6c64f8f..791507f 100644 --- a/docs/compodoc/components/AuthComponent.html +++ b/docs/compodoc/components/AuthComponent.html @@ -304,8 +304,8 @@ @@ -386,8 +386,8 @@ @@ -425,8 +425,8 @@ @@ -464,8 +464,8 @@ @@ -674,17 +674,17 @@
-
import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
-import {FormBuilder, FormGroup, Validators} from '@angular/forms';
-import {CustomErrorStateMatcher} from '@app/_helpers';
-import {AuthService} from '@app/_services';
-import {Router} from '@angular/router';
+        
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { CustomErrorStateMatcher } from '@app/_helpers';
+import { AuthService } from '@app/_services';
+import { Router } from '@angular/router';
 
 @Component({
   selector: 'app-auth',
   templateUrl: './auth.component.html',
   styleUrls: ['./auth.component.scss'],
-  changeDetection: ChangeDetectionStrategy.OnPush
+  changeDetection: ChangeDetectionStrategy.OnPush,
 })
 export class AuthComponent implements OnInit {
   keyForm: FormGroup;
@@ -696,7 +696,7 @@ export class AuthComponent implements OnInit {
     private authService: AuthService,
     private formBuilder: FormBuilder,
     private router: Router
-  ) { }
+  ) {}
 
   async ngOnInit(): Promise<void> {
     this.keyForm = this.formBuilder.group({
@@ -709,12 +709,16 @@ export class AuthComponent implements OnInit {
     // }
   }
 
-  get keyFormStub(): any { return this.keyForm.controls; }
+  get keyFormStub(): any {
+    return this.keyForm.controls;
+  }
 
   async onSubmit(): Promise<void> {
     this.submitted = true;
 
-    if (this.keyForm.invalid) { return; }
+    if (this.keyForm.invalid) {
+      return;
+    }
 
     this.loading = true;
     await this.authService.setKey(this.keyFormStub.key.value);
@@ -722,11 +726,11 @@ export class AuthComponent implements OnInit {
   }
 
   login(): void {
-     // TODO check if we have privatekey
-     // Send us to home if we have a private key
-     // talk to meta somehow
-     // in the error interceptor if 401/403 handle it
-     // if 200 go /home
+    // TODO check if we have privatekey
+    // Send us to home if we have a private key
+    // talk to meta somehow
+    // in the error interceptor if 401/403 handle it
+    // if 200 go /home
     if (this.authService.getPrivateKey()) {
       this.router.navigate(['/home']);
     }
@@ -840,8 +844,8 @@ export class AuthComponent implements OnInit {
 
 
 
diff --git a/docs/compodoc/components/CreateAccountComponent.html b/docs/compodoc/components/CreateAccountComponent.html
index 783e4c9..66c08bd 100644
--- a/docs/compodoc/components/CreateAccountComponent.html
+++ b/docs/compodoc/components/CreateAccountComponent.html
@@ -341,8 +341,8 @@
 
             
@@ -585,7 +585,7 @@ @@ -596,18 +596,18 @@
-
import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
-import {FormBuilder, FormGroup, Validators} from '@angular/forms';
-import {LocationService, UserService} from '@app/_services';
-import {CustomErrorStateMatcher} from '@app/_helpers';
-import {first} from 'rxjs/operators';
-import {AreaName, Category} from '@app/_models';
+        
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { LocationService, UserService } from '@app/_services';
+import { CustomErrorStateMatcher } from '@app/_helpers';
+import { first } from 'rxjs/operators';
+import { AreaName, Category } from '@app/_models';
 
 @Component({
   selector: 'app-create-account',
   templateUrl: './create-account.component.html',
   styleUrls: ['./create-account.component.scss'],
-  changeDetection: ChangeDetectionStrategy.OnPush
+  changeDetection: ChangeDetectionStrategy.OnPush,
 })
 export class CreateAccountComponent implements OnInit {
   createForm: FormGroup;
@@ -622,7 +622,7 @@ export class CreateAccountComponent implements OnInit {
     private formBuilder: FormBuilder,
     private locationService: LocationService,
     private userService: UserService
-  ) { }
+  ) {}
 
   ngOnInit(): void {
     this.createForm = this.formBuilder.group({
@@ -635,19 +635,35 @@ export class CreateAccountComponent implements OnInit {
       location: ['', Validators.required],
       gender: ['', Validators.required],
       referrer: ['', Validators.required],
-      businessCategory: ['', Validators.required]
+      businessCategory: ['', Validators.required],
     });
-    this.userService.getCategories().pipe(first()).subscribe(res => this.categories = res);
-    this.locationService.getAreaNames().pipe(first()).subscribe(res => this.areaNames = res);
-    this.userService.getAccountTypes().pipe(first()).subscribe(res => this.accountTypes = res);
-    this.userService.getGenders().pipe(first()).subscribe(res => this.genders = res);
+    this.userService
+      .getCategories()
+      .pipe(first())
+      .subscribe((res) => (this.categories = res));
+    this.locationService
+      .getAreaNames()
+      .pipe(first())
+      .subscribe((res) => (this.areaNames = res));
+    this.userService
+      .getAccountTypes()
+      .pipe(first())
+      .subscribe((res) => (this.accountTypes = res));
+    this.userService
+      .getGenders()
+      .pipe(first())
+      .subscribe((res) => (this.genders = res));
   }
 
-  get createFormStub(): any { return this.createForm.controls; }
+  get createFormStub(): any {
+    return this.createForm.controls;
+  }
 
   onSubmit(): void {
     this.submitted = true;
-    if (this.createForm.invalid || !confirm('Create account?')) { return; }
+    if (this.createForm.invalid || !confirm('Create account?')) {
+      return;
+    }
     this.submitted = false;
   }
 }
@@ -823,8 +839,8 @@ export class CreateAccountComponent implements OnInit {
 
 
 
diff --git a/docs/compodoc/components/ErrorDialogComponent.html b/docs/compodoc/components/ErrorDialogComponent.html
index 4e09aee..13d94d8 100644
--- a/docs/compodoc/components/ErrorDialogComponent.html
+++ b/docs/compodoc/components/ErrorDialogComponent.html
@@ -233,7 +233,7 @@
                     
                         
@@ -246,19 +246,17 @@
-
import {Component, ChangeDetectionStrategy, Inject} from '@angular/core';
-import {MAT_DIALOG_DATA} from '@angular/material/dialog';
+        
import { Component, ChangeDetectionStrategy, Inject } from '@angular/core';
+import { MAT_DIALOG_DATA } from '@angular/material/dialog';
 
 @Component({
   selector: 'app-error-dialog',
   templateUrl: './error-dialog.component.html',
   styleUrls: ['./error-dialog.component.scss'],
-  changeDetection: ChangeDetectionStrategy.OnPush
+  changeDetection: ChangeDetectionStrategy.OnPush,
 })
 export class ErrorDialogComponent {
-
-  constructor(@Inject(MAT_DIALOG_DATA) public data: any) { }
-
+  constructor(@Inject(MAT_DIALOG_DATA) public data: any) {}
 }
 
@@ -310,8 +308,8 @@ export class ErrorDialogComponent { diff --git a/docs/compodoc/components/FooterComponent.html b/docs/compodoc/components/FooterComponent.html index 727b6da..187527d 100644 --- a/docs/compodoc/components/FooterComponent.html +++ b/docs/compodoc/components/FooterComponent.html @@ -199,8 +199,8 @@
@@ -222,21 +222,18 @@
-
import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
+        
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
 
 @Component({
   selector: 'app-footer',
   templateUrl: './footer.component.html',
   styleUrls: ['./footer.component.scss'],
-  changeDetection: ChangeDetectionStrategy.OnPush
+  changeDetection: ChangeDetectionStrategy.OnPush,
 })
 export class FooterComponent implements OnInit {
+  constructor() {}
 
-  constructor() { }
-
-  ngOnInit(): void {
-  }
-
+  ngOnInit(): void {}
 }
 
@@ -283,8 +280,8 @@ export class FooterComponent implements OnInit { diff --git a/docs/compodoc/components/FooterStubComponent.html b/docs/compodoc/components/FooterStubComponent.html index b207ea6..381e084 100644 --- a/docs/compodoc/components/FooterStubComponent.html +++ b/docs/compodoc/components/FooterStubComponent.html @@ -150,8 +150,8 @@ export class FooterStubComponent {} diff --git a/docs/compodoc/components/NetworkStatusComponent.html b/docs/compodoc/components/NetworkStatusComponent.html new file mode 100644 index 0000000..921da8f --- /dev/null +++ b/docs/compodoc/components/NetworkStatusComponent.html @@ -0,0 +1,498 @@ + + + + + + CICADA + + + + + + + + + + + + +
+
+ + +
+
+ + + + + + + + +
+

+

File

+

+

+ src/app/shared/network-status/network-status.component.ts +

+ + + +

+

Implements

+

+

+ OnInit +

+ + +
+

Metadata

+
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
changeDetectionChangeDetectionStrategy.OnPush
selectorapp-network-status
styleUrls./network-status.component.scss
templateUrl./network-status.component.html
+ + +
+

Index

+ + + + + + + + + + + + + + + + + + + + + +
+
Properties
+
+ +
+
Methods
+
+ +
+
+ +
+

Constructor

+ + + + + + + + + + + + + +
+constructor(cdr: ChangeDetectorRef) +
+ +
+
+ Parameters : + + + + + + + + + + + + + + + + + + +
NameTypeOptional
cdr + ChangeDetectorRef + + No +
+
+
+
+ + + + + +
+ +

+ Methods +

+ + + + + + + + + + + + + + + + + + + +
+ + + + handleNetworkChange + + + +
+handleNetworkChange() +
+ +
+ +
+ Returns : void + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + ngOnInit + + + +
+ngOnInit() +
+ +
+ +
+ Returns : void + +
+
+
+
+ +

+ Properties +

+ + + + + + + + + + + + + + + + + +
+ + + + noInternetConnection + + +
+ Type : boolean + +
+ Default value : !navigator.onLine +
+ +
+
+ +
+ + +
+
import { Component, OnInit, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
+
+@Component({
+  selector: 'app-network-status',
+  templateUrl: './network-status.component.html',
+  styleUrls: ['./network-status.component.scss'],
+  changeDetection: ChangeDetectionStrategy.OnPush,
+})
+export class NetworkStatusComponent implements OnInit {
+  noInternetConnection: boolean = !navigator.onLine;
+
+  constructor(private cdr: ChangeDetectorRef) {
+    this.handleNetworkChange();
+  }
+
+  ngOnInit(): void {}
+
+  handleNetworkChange(): void {
+    setTimeout(() => {
+      if (!navigator.onLine !== this.noInternetConnection) {
+        this.noInternetConnection = !navigator.onLine;
+        this.cdr.detectChanges();
+      }
+      this.handleNetworkChange();
+    }, 5000);
+  }
+}
+
+
+ +
+
<nav class="navbar navbar-dark bg-dark">
+  <h1 class="navbar-brand">
+    <div *ngIf="noInternetConnection; then offlineBlock else onlineBlock"></div>
+    <ng-template #offlineBlock>
+      <strong style="color: red;">OFFLINE </strong>
+      <img width="20rem" src="assets/images/no-wifi.svg" alt="Internet Disconnected">
+    </ng-template>
+    <ng-template #onlineBlock>
+      <strong style="color: lawngreen;">ONLINE </strong>
+      <img width="20rem" src="assets/images/wifi.svg" alt="Internet Connected">
+    </ng-template>
+  </h1>
+</nav>
+
+
+ +
+

+ ./network-status.component.scss +

+
+
+ +
+
+
+
+ Legend +
+
+
Html element +
+
+
Component +
+
+
Html element with directive +
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + +
+
+

result-matching ""

+
    +
    +
    +

    No results matching ""

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/compodoc/components/OrganizationComponent.html b/docs/compodoc/components/OrganizationComponent.html index 1ddc5f0..23a6408 100644 --- a/docs/compodoc/components/OrganizationComponent.html +++ b/docs/compodoc/components/OrganizationComponent.html @@ -266,8 +266,8 @@ - + @@ -441,7 +441,7 @@ - + @@ -452,38 +452,40 @@
    -
    import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
    -import {FormBuilder, FormGroup, Validators} from '@angular/forms';
    -import {CustomErrorStateMatcher} from '@app/_helpers';
    +        
    import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
    +import { FormBuilder, FormGroup, Validators } from '@angular/forms';
    +import { CustomErrorStateMatcher } from '@app/_helpers';
     
     @Component({
       selector: 'app-organization',
       templateUrl: './organization.component.html',
       styleUrls: ['./organization.component.scss'],
    -  changeDetection: ChangeDetectionStrategy.OnPush
    +  changeDetection: ChangeDetectionStrategy.OnPush,
     })
     export class OrganizationComponent implements OnInit {
       organizationForm: FormGroup;
       submitted: boolean = false;
       matcher: CustomErrorStateMatcher = new CustomErrorStateMatcher();
     
    -  constructor(
    -    private formBuilder: FormBuilder
    -  ) { }
    +  constructor(private formBuilder: FormBuilder) {}
     
       ngOnInit(): void {
         this.organizationForm = this.formBuilder.group({
           disbursement: ['', Validators.required],
           transfer: '',
    -      countryCode: ['', Validators.required]
    +      countryCode: ['', Validators.required],
         });
       }
     
    -  get organizationFormStub(): any { return this.organizationForm.controls; }
    +  get organizationFormStub(): any {
    +    return this.organizationForm.controls;
    +  }
     
       onSubmit(): void {
         this.submitted = true;
    -    if (this.organizationForm.invalid || !confirm('Set organization information?')) { return; }
    +    if (this.organizationForm.invalid || !confirm('Set organization information?')) {
    +      return;
    +    }
         this.submitted = false;
       }
     }
    @@ -590,8 +592,8 @@ export class OrganizationComponent implements OnInit {
     
     
     
    diff --git a/docs/compodoc/components/PagesComponent.html b/docs/compodoc/components/PagesComponent.html
    index 104470a..6d7ebf9 100644
    --- a/docs/compodoc/components/PagesComponent.html
    +++ b/docs/compodoc/components/PagesComponent.html
    @@ -210,18 +210,18 @@
     
     
         
    -
    import {ChangeDetectionStrategy, Component} from '@angular/core';
    +        
    import { ChangeDetectionStrategy, Component } from '@angular/core';
     
     @Component({
       selector: 'app-pages',
       templateUrl: './pages.component.html',
       styleUrls: ['./pages.component.scss'],
    -  changeDetection: ChangeDetectionStrategy.OnPush
    +  changeDetection: ChangeDetectionStrategy.OnPush,
     })
     export class PagesComponent {
       url: string = 'https://dashboard.sarafu.network/';
     
    -  constructor() { }
    +  constructor() {}
     }
     
    @@ -295,8 +295,8 @@ export class PagesComponent { diff --git a/docs/compodoc/components/SettingsComponent.html b/docs/compodoc/components/SettingsComponent.html index 64638f8..a247af2 100644 --- a/docs/compodoc/components/SettingsComponent.html +++ b/docs/compodoc/components/SettingsComponent.html @@ -267,8 +267,8 @@ - + @@ -337,8 +337,8 @@ - + @@ -376,8 +376,8 @@ - + @@ -415,8 +415,8 @@ - + @@ -629,19 +629,19 @@
    -
    import {ChangeDetectionStrategy, Component, OnInit, ViewChild} from '@angular/core';
    -import {MatTableDataSource} from '@angular/material/table';
    -import {MatPaginator} from '@angular/material/paginator';
    -import {MatSort} from '@angular/material/sort';
    -import {AuthService} from '@app/_services';
    -import {Staff} from '@app/_models/staff';
    -import {exportCsv} from '@app/_helpers';
    +        
    import { ChangeDetectionStrategy, Component, OnInit, ViewChild } from '@angular/core';
    +import { MatTableDataSource } from '@angular/material/table';
    +import { MatPaginator } from '@angular/material/paginator';
    +import { MatSort } from '@angular/material/sort';
    +import { AuthService } from '@app/_services';
    +import { Staff } from '@app/_models/staff';
    +import { exportCsv } from '@app/_helpers';
     
     @Component({
       selector: 'app-settings',
       templateUrl: './settings.component.html',
       styleUrls: ['./settings.component.scss'],
    -  changeDetection: ChangeDetectionStrategy.OnPush
    +  changeDetection: ChangeDetectionStrategy.OnPush,
     })
     export class SettingsComponent implements OnInit {
       date: string;
    @@ -652,9 +652,7 @@ export class SettingsComponent implements OnInit {
       @ViewChild(MatPaginator) paginator: MatPaginator;
       @ViewChild(MatSort) sort: MatSort;
     
    -  constructor(
    -    private authService: AuthService
    -  ) { }
    +  constructor(private authService: AuthService) {}
     
       ngOnInit(): void {
         const d = new Date();
    @@ -822,8 +820,8 @@ export class SettingsComponent implements OnInit {
     
     
     
    diff --git a/docs/compodoc/components/SidebarComponent.html b/docs/compodoc/components/SidebarComponent.html
    index cc92b1a..64f756c 100644
    --- a/docs/compodoc/components/SidebarComponent.html
    +++ b/docs/compodoc/components/SidebarComponent.html
    @@ -199,8 +199,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -222,21 +222,18 @@
     
     
         
    -
    import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
    +        
    import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
     
     @Component({
       selector: 'app-sidebar',
       templateUrl: './sidebar.component.html',
       styleUrls: ['./sidebar.component.scss'],
    -  changeDetection: ChangeDetectionStrategy.OnPush
    +  changeDetection: ChangeDetectionStrategy.OnPush,
     })
     export class SidebarComponent implements OnInit {
    +  constructor() {}
     
    -  constructor() { }
    -
    -  ngOnInit(): void {
    -  }
    -
    +  ngOnInit(): void {}
     }
     
    @@ -330,8 +327,8 @@ export class SidebarComponent implements OnInit { diff --git a/docs/compodoc/components/SidebarStubComponent.html b/docs/compodoc/components/SidebarStubComponent.html index 4d9243c..a9c7b2d 100644 --- a/docs/compodoc/components/SidebarStubComponent.html +++ b/docs/compodoc/components/SidebarStubComponent.html @@ -150,8 +150,8 @@ export class FooterStubComponent {} diff --git a/docs/compodoc/components/TokenDetailsComponent.html b/docs/compodoc/components/TokenDetailsComponent.html index 812a6e1..654c6e7 100644 --- a/docs/compodoc/components/TokenDetailsComponent.html +++ b/docs/compodoc/components/TokenDetailsComponent.html @@ -311,35 +311,33 @@
    -
    import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
    -import {ActivatedRoute, Params} from '@angular/router';
    -import {TokenService} from '@app/_services';
    -import {first} from 'rxjs/operators';
    -import {Token} from '../../../_models';
    +        
    import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
    +import { ActivatedRoute, Params } from '@angular/router';
    +import { TokenService } from '@app/_services';
    +import { first } from 'rxjs/operators';
    +import { Token } from '../../../_models';
     
     @Component({
       selector: 'app-token-details',
       templateUrl: './token-details.component.html',
       styleUrls: ['./token-details.component.scss'],
    -  changeDetection: ChangeDetectionStrategy.OnPush
    +  changeDetection: ChangeDetectionStrategy.OnPush,
     })
     export class TokenDetailsComponent implements OnInit {
       token: Token;
     
    -  constructor(
    -    private route: ActivatedRoute,
    -    private tokenService: TokenService
    -  ) {
    +  constructor(private route: ActivatedRoute, private tokenService: TokenService) {
         this.route.paramMap.subscribe((params: Params) => {
    -      this.tokenService.getTokenBySymbol(params.get('id')).pipe(first()).subscribe(res => {
    -        this.token = res;
    -      });
    +      this.tokenService
    +        .getTokenBySymbol(params.get('id'))
    +        .pipe(first())
    +        .subscribe((res) => {
    +          this.token = res;
    +        });
         });
       }
     
    -  ngOnInit(): void {
    -  }
    -
    +  ngOnInit(): void {}
     }
     
    @@ -441,8 +439,8 @@ export class TokenDetailsComponent implements OnInit { diff --git a/docs/compodoc/components/TokensComponent.html b/docs/compodoc/components/TokensComponent.html index 7254928..ed75505 100644 --- a/docs/compodoc/components/TokensComponent.html +++ b/docs/compodoc/components/TokensComponent.html @@ -656,21 +656,21 @@
    -
    import {ChangeDetectionStrategy, Component, OnInit, ViewChild} from '@angular/core';
    -import {MatPaginator} from '@angular/material/paginator';
    -import {MatSort} from '@angular/material/sort';
    -import {LoggingService, TokenService} from '@app/_services';
    -import {MatTableDataSource} from '@angular/material/table';
    -import {Router} from '@angular/router';
    -import {exportCsv} from '@app/_helpers';
    -import {TokenRegistry} from '../../_eth';
    -import {Token} from '../../_models';
    +        
    import { ChangeDetectionStrategy, Component, OnInit, ViewChild } from '@angular/core';
    +import { MatPaginator } from '@angular/material/paginator';
    +import { MatSort } from '@angular/material/sort';
    +import { LoggingService, TokenService } from '@app/_services';
    +import { MatTableDataSource } from '@angular/material/table';
    +import { Router } from '@angular/router';
    +import { exportCsv } from '@app/_helpers';
    +import { TokenRegistry } from '../../_eth';
    +import { Token } from '../../_models';
     
     @Component({
       selector: 'app-tokens',
       templateUrl: './tokens.component.html',
       styleUrls: ['./tokens.component.scss'],
    -  changeDetection: ChangeDetectionStrategy.OnPush
    +  changeDetection: ChangeDetectionStrategy.OnPush,
     })
     export class TokensComponent implements OnInit {
       dataSource: MatTableDataSource<any>;
    @@ -683,7 +683,7 @@ export class TokensComponent implements OnInit {
         private tokenService: TokenService,
         private loggingService: LoggingService,
         private router: Router
    -  ) { }
    +  ) {}
     
       async ngOnInit(): Promise<void> {
         this.tokenService.LoadEvent.subscribe(async () => {
    @@ -816,8 +816,8 @@ export class TokensComponent implements OnInit {
     
     
     
    diff --git a/docs/compodoc/components/TopbarComponent.html b/docs/compodoc/components/TopbarComponent.html
    index 6cffe06..7c5e318 100644
    --- a/docs/compodoc/components/TopbarComponent.html
    +++ b/docs/compodoc/components/TopbarComponent.html
    @@ -199,8 +199,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -222,21 +222,18 @@
     
     
         
    -
    import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
    +        
    import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
     
     @Component({
       selector: 'app-topbar',
       templateUrl: './topbar.component.html',
       styleUrls: ['./topbar.component.scss'],
    -  changeDetection: ChangeDetectionStrategy.OnPush
    +  changeDetection: ChangeDetectionStrategy.OnPush,
     })
     export class TopbarComponent implements OnInit {
    +  constructor() {}
     
    -  constructor() { }
    -
    -  ngOnInit(): void {
    -  }
    -
    +  ngOnInit(): void {}
     }
     
    @@ -289,8 +286,8 @@ export class TopbarComponent implements OnInit { diff --git a/docs/compodoc/components/TopbarStubComponent.html b/docs/compodoc/components/TopbarStubComponent.html index c30274b..70f6d81 100644 --- a/docs/compodoc/components/TopbarStubComponent.html +++ b/docs/compodoc/components/TopbarStubComponent.html @@ -150,8 +150,8 @@ export class FooterStubComponent {} diff --git a/docs/compodoc/components/TransactionDetailsComponent.html b/docs/compodoc/components/TransactionDetailsComponent.html index aabdcd8..7a0ffe9 100644 --- a/docs/compodoc/components/TransactionDetailsComponent.html +++ b/docs/compodoc/components/TransactionDetailsComponent.html @@ -323,8 +323,8 @@ - + @@ -434,8 +434,8 @@ - + @@ -475,8 +475,8 @@ - + @@ -516,8 +516,8 @@ - + @@ -557,8 +557,8 @@ - + @@ -667,18 +667,18 @@
    -
    import {ChangeDetectionStrategy, Component, Input, OnInit} from '@angular/core';
    -import {Router} from '@angular/router';
    -import {TransactionService} from '@app/_services';
    -import {copyToClipboard} from '@app/_helpers';
    -import {MatSnackBar} from '@angular/material/snack-bar';
    -import {strip0x} from '@src/assets/js/ethtx/dist/hex';
    +        
    import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
    +import { Router } from '@angular/router';
    +import { TransactionService } from '@app/_services';
    +import { copyToClipboard } from '@app/_helpers';
    +import { MatSnackBar } from '@angular/material/snack-bar';
    +import { strip0x } from '@src/assets/js/ethtx/dist/hex';
     
     @Component({
       selector: 'app-transaction-details',
       templateUrl: './transaction-details.component.html',
       styleUrls: ['./transaction-details.component.scss'],
    -  changeDetection: ChangeDetectionStrategy.OnPush
    +  changeDetection: ChangeDetectionStrategy.OnPush,
     })
     export class TransactionDetailsComponent implements OnInit {
       @Input() transaction;
    @@ -689,15 +689,18 @@ export class TransactionDetailsComponent implements OnInit {
       constructor(
         private router: Router,
         private transactionService: TransactionService,
    -    private snackBar: MatSnackBar,
    -  ) { }
    +    private snackBar: MatSnackBar
    +  ) {}
     
       ngOnInit(): void {
         if (this.transaction?.type === 'conversion') {
    -      this.traderBloxbergLink = 'https://blockexplorer.bloxberg.org/address/' + this.transaction?.trader + '/transactions';
    +      this.traderBloxbergLink =
    +        'https://blockexplorer.bloxberg.org/address/' + this.transaction?.trader + '/transactions';
         } else {
    -      this.senderBloxbergLink = 'https://blockexplorer.bloxberg.org/address/' + this.transaction?.from + '/transactions';
    -      this.recipientBloxbergLink = 'https://blockexplorer.bloxberg.org/address/' + this.transaction?.to + '/transactions';
    +      this.senderBloxbergLink =
    +        'https://blockexplorer.bloxberg.org/address/' + this.transaction?.from + '/transactions';
    +      this.recipientBloxbergLink =
    +        'https://blockexplorer.bloxberg.org/address/' + this.transaction?.to + '/transactions';
         }
       }
     
    @@ -917,8 +920,8 @@ export class TransactionDetailsComponent implements OnInit {
     
     
     
    diff --git a/docs/compodoc/components/TransactionsComponent.html b/docs/compodoc/components/TransactionsComponent.html
    index 37395a6..765753f 100644
    --- a/docs/compodoc/components/TransactionsComponent.html
    +++ b/docs/compodoc/components/TransactionsComponent.html
    @@ -217,7 +217,7 @@
                     
                             
                                 
    -                                
    +                                
                                 
                             
     
    @@ -310,8 +310,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -391,8 +391,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -430,8 +430,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -469,8 +469,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -508,8 +508,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -547,8 +547,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -622,7 +622,7 @@
                         
                             
                                 
    -                                    
    +                                    
                                 
                             
     
    @@ -654,7 +654,7 @@
                         
                             
                                 
    -                                    
    +                                    
                                 
                             
     
    @@ -690,7 +690,7 @@
                         
                             
                                 
    -                                    
    +                                    
                                 
                             
     
    @@ -726,7 +726,7 @@
                         
                             
                                 
    -                                    
    +                                    
                                 
                             
     
    @@ -753,7 +753,7 @@
                         
                             
                                 
    -                                    
    +                                    
                                 
                             
     
    @@ -780,7 +780,7 @@
                         
                             
                                 
    -                                    
    +                                    
                                 
                             
     
    @@ -812,7 +812,7 @@
                         
                             
                                 
    -                                    
    +                                    
                                 
                             
     
    @@ -839,7 +839,7 @@
                         
                             
                                 
    -                                    
    +                                    
                                 
                             
     
    @@ -871,7 +871,7 @@
                         
                             
                                 
    -                                    
    +                                    
                                 
                             
     
    @@ -898,7 +898,7 @@
                         
                             
                                 
    -                                    
    +                                    
                                 
                             
     
    @@ -911,20 +911,26 @@
     
     
         
    -
    import {AfterViewInit, ChangeDetectionStrategy, Component, OnInit, ViewChild} from '@angular/core';
    -import {BlockSyncService, TransactionService, UserService} from '@app/_services';
    -import {MatTableDataSource} from '@angular/material/table';
    -import {MatPaginator} from '@angular/material/paginator';
    -import {MatSort} from '@angular/material/sort';
    -import {exportCsv} from '@app/_helpers';
    -import {first} from 'rxjs/operators';
    -import {Transaction} from '@app/_models';
    +        
    import {
    +  AfterViewInit,
    +  ChangeDetectionStrategy,
    +  Component,
    +  OnInit,
    +  ViewChild,
    +} from '@angular/core';
    +import { BlockSyncService, TransactionService, UserService } from '@app/_services';
    +import { MatTableDataSource } from '@angular/material/table';
    +import { MatPaginator } from '@angular/material/paginator';
    +import { MatSort } from '@angular/material/sort';
    +import { exportCsv } from '@app/_helpers';
    +import { first } from 'rxjs/operators';
    +import { Transaction } from '@app/_models';
     
     @Component({
       selector: 'app-transactions',
       templateUrl: './transactions.component.html',
       styleUrls: ['./transactions.component.scss'],
    -  changeDetection: ChangeDetectionStrategy.OnPush
    +  changeDetection: ChangeDetectionStrategy.OnPush,
     })
     export class TransactionsComponent implements OnInit, AfterViewInit {
       transactionDataSource: MatTableDataSource<any>;
    @@ -948,13 +954,16 @@ export class TransactionsComponent implements OnInit, AfterViewInit {
       }
     
       ngOnInit(): void {
    -    this.transactionService.transactionsSubject.subscribe(transactions => {
    +    this.transactionService.transactionsSubject.subscribe((transactions) => {
           this.transactionDataSource = new MatTableDataSource<any>(transactions);
           this.transactionDataSource.paginator = this.paginator;
           this.transactionDataSource.sort = this.sort;
           this.transactions = transactions;
         });
    -    this.userService.getTransactionTypes().pipe(first()).subscribe(res => this.transactionsTypes = res);
    +    this.userService
    +      .getTransactionTypes()
    +      .pipe(first())
    +      .subscribe((res) => (this.transactionsTypes = res));
       }
     
       viewTransaction(transaction): void {
    @@ -967,12 +976,14 @@ export class TransactionsComponent implements OnInit, AfterViewInit {
     
       filterTransactions(): void {
         if (this.transactionsType === 'all') {
    -      this.transactionService.transactionsSubject.subscribe(transactions => {
    +      this.transactionService.transactionsSubject.subscribe((transactions) => {
             this.transactionDataSource.data = transactions;
             this.transactions = transactions;
           });
         } else {
    -      this.transactionDataSource.data = this.transactions.filter(transaction => transaction.type === this.transactionsType);
    +      this.transactionDataSource.data = this.transactions.filter(
    +        (transaction) => transaction.type === this.transactionsType
    +      );
         }
       }
     
    @@ -1120,8 +1131,8 @@ export class TransactionsComponent implements OnInit, AfterViewInit {
     
     
     
    diff --git a/docs/compodoc/coverage.html b/docs/compodoc/coverage.html
    index b60384c..0dbd865 100644
    --- a/docs/compodoc/coverage.html
    +++ b/docs/compodoc/coverage.html
    @@ -748,6 +748,18 @@
                     (0/2)
                 
             
    +        
    +            
    +                
    +                src/app/_pgp/pgp-signer.ts
    +            
    +            interface
    +            Signature
    +            
    +                0 %
    +                (0/5)
    +            
    +        
             
                 
                     
    @@ -913,7 +925,7 @@
                 AppComponent
                 
                     0 %
    -                (0/9)
    +                (0/10)
                 
             
             
    @@ -1156,6 +1168,18 @@
                     (0/3)
                 
             
    +        
    +            
    +                
    +                src/app/shared/network-status/network-status.component.ts
    +            
    +            component
    +            NetworkStatusComponent
    +            
    +                0 %
    +                (0/5)
    +            
    +        
             
                 
                     
    diff --git a/docs/compodoc/dependencies.html b/docs/compodoc/dependencies.html
    index 1f4413c..7c995b7 100644
    --- a/docs/compodoc/dependencies.html
    +++ b/docs/compodoc/dependencies.html
    @@ -67,6 +67,8 @@
                 @angular/platform-browser-dynamic : ~10.2.0
             
  • @angular/router : ~10.2.0
  • +
  • + @angular/service-worker : ~10.2.0
  • @popperjs/core : ^2.5.4
  • @@ -89,6 +91,8 @@ datatables.net-dt : ^1.10.22
  • ethers : ^5.0.31
  • +
  • + http-server : ^0.12.3
  • jquery : ^3.5.1
  • diff --git a/docs/compodoc/directives/MenuSelectionDirective.html b/docs/compodoc/directives/MenuSelectionDirective.html index 125d10c..461ba7b 100644 --- a/docs/compodoc/directives/MenuSelectionDirective.html +++ b/docs/compodoc/directives/MenuSelectionDirective.html @@ -195,8 +195,8 @@ - + @@ -219,17 +219,13 @@
    -
    import {Directive, ElementRef, Renderer2} from '@angular/core';
    +        
    import { Directive, ElementRef, Renderer2 } from '@angular/core';
     
     @Directive({
    -  selector: '[appMenuSelection]'
    +  selector: '[appMenuSelection]',
     })
     export class MenuSelectionDirective {
    -
    -  constructor(
    -    private elementRef: ElementRef,
    -    private renderer: Renderer2
    -  ) {
    +  constructor(private elementRef: ElementRef, private renderer: Renderer2) {
         this.renderer.listen(this.elementRef.nativeElement, 'click', () => {
           const mediaQuery = window.matchMedia('(max-width: 768px)');
           if (mediaQuery.matches) {
    diff --git a/docs/compodoc/directives/MenuToggleDirective.html b/docs/compodoc/directives/MenuToggleDirective.html
    index 3886e74..1a28feb 100644
    --- a/docs/compodoc/directives/MenuToggleDirective.html
    +++ b/docs/compodoc/directives/MenuToggleDirective.html
    @@ -195,8 +195,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -219,17 +219,13 @@
     
     
         
    -
    import {Directive, ElementRef, Renderer2} from '@angular/core';
    +        
    import { Directive, ElementRef, Renderer2 } from '@angular/core';
     
     @Directive({
    -  selector: '[appMenuToggle]'
    +  selector: '[appMenuToggle]',
     })
     export class MenuToggleDirective {
    -
    -  constructor(
    -    private elementRef: ElementRef,
    -    private renderer: Renderer2
    -  ) {
    +  constructor(private elementRef: ElementRef, private renderer: Renderer2) {
         this.renderer.listen(this.elementRef.nativeElement, 'click', () => {
           this.onMenuToggle();
         });
    diff --git a/docs/compodoc/directives/PasswordToggleDirective.html b/docs/compodoc/directives/PasswordToggleDirective.html
    index 30c4a12..610e96a 100644
    --- a/docs/compodoc/directives/PasswordToggleDirective.html
    +++ b/docs/compodoc/directives/PasswordToggleDirective.html
    @@ -256,8 +256,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -280,10 +280,10 @@
     
     
         
    -
    import {Directive, ElementRef, Input, Renderer2} from '@angular/core';
    +        
    import { Directive, ElementRef, Input, Renderer2 } from '@angular/core';
     
     @Directive({
    -  selector: '[appPasswordToggle]'
    +  selector: '[appPasswordToggle]',
     })
     export class PasswordToggleDirective {
       @Input()
    @@ -292,10 +292,7 @@ export class PasswordToggleDirective {
       @Input()
       iconId: string;
     
    -  constructor(
    -    private elementRef: ElementRef,
    -    private renderer: Renderer2,
    -  ) {
    +  constructor(private elementRef: ElementRef, private renderer: Renderer2) {
         this.renderer.listen(this.elementRef.nativeElement, 'click', () => {
           this.togglePasswordVisibility();
         });
    diff --git a/docs/compodoc/directives/RouterLinkDirectiveStub.html b/docs/compodoc/directives/RouterLinkDirectiveStub.html
    index 0e6d22b..1bb69f9 100644
    --- a/docs/compodoc/directives/RouterLinkDirectiveStub.html
    +++ b/docs/compodoc/directives/RouterLinkDirectiveStub.html
    @@ -68,7 +68,7 @@
     
                         
                             Selector
    -                        [routerLink]
    +                        [appRouterLink]
                         
     
                     
    @@ -150,7 +150,7 @@
                     
                             
                                 
    -                                    
    +                                    
                                 
                             
                 
    @@ -181,8 +181,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -221,7 +221,7 @@
                         
                             
                                 
    -                                    
    +                                    
                                 
                             
     
    @@ -238,9 +238,11 @@
             
    import {Directive, HostListener, Input} from '@angular/core';
     
     @Directive({
    -  selector: '[routerLink]'
    +  selector: '[appRouterLink]'
     })
    +// tslint:disable-next-line:directive-class-suffix
     export class RouterLinkDirectiveStub {
    +  // tslint:disable-next-line:no-input-rename
       @Input('routerLink') linkParams: any;
       navigatedTo: any = null;
     
    diff --git a/docs/compodoc/graph/dependencies.svg b/docs/compodoc/graph/dependencies.svg
    index db72481..8f6a053 100644
    --- a/docs/compodoc/graph/dependencies.svg
    +++ b/docs/compodoc/graph/dependencies.svg
    @@ -102,41 +102,41 @@
     
     
     cluster_SharedModule
    -
    +
     
     
     cluster_SharedModule_declarations
    -
    +
     
    -
    +
     cluster_SharedModule_exports
    -
    +
     
    -
    +
     cluster_TokensModule
     
     
    -
    +
     cluster_TokensModule_declarations
     
     
    -
    +
     cluster_TokensModule_imports
     
     
    -
    +
     cluster_TransactionsModule
     
     
    -
    +
     cluster_TransactionsModule_declarations
     
     
    -
    +
     cluster_TransactionsModule_imports
     
     
    -
    +
     cluster_TransactionsModule_exports
     
     
    @@ -225,7 +225,7 @@
     TransactionsModule
     
     
    -
    +
     SharedModule->TransactionsModule
     
     
    @@ -279,85 +279,97 @@
     
     
     
    -
    +
     FooterComponent 
    -
    -FooterComponent 
    +
    +FooterComponent 
     
     
    -
    +
     SharedModule->FooterComponent 
    -
    -
    +
    +
     
     
    -
    +
     MenuSelectionDirective 
    -
    -MenuSelectionDirective 
    +
    +MenuSelectionDirective 
     
     
    -
    +
     SharedModule->MenuSelectionDirective 
    -
    -
    +
    +
    +
    +
    +
    +NetworkStatusComponent 
    +
    +NetworkStatusComponent 
    +
    +
    +
    +SharedModule->NetworkStatusComponent 
    +
    +
     
     
    -
    +
     SafePipe 
    -
    -SafePipe 
    +
    +SafePipe 
     
     
    -
    +
     SharedModule->SafePipe 
    -
    -
    +
    +
     
     
    -
    +
     SidebarComponent 
    -
    -SidebarComponent 
    +
    +SidebarComponent 
     
     
    -
    +
     SharedModule->SidebarComponent 
    -
    -
    +
    +
     
     
    -
    +
     TokenRatioPipe 
    -
    -TokenRatioPipe 
    +
    +TokenRatioPipe 
     
     
    -
    +
     SharedModule->TokenRatioPipe 
    -
    -
    +
    +
     
     
    -
    +
     TopbarComponent 
    -
    -TopbarComponent 
    +
    +TopbarComponent 
     
     
    -
    +
     SharedModule->TopbarComponent 
    -
    -
    +
    +
     
     
    -
    +
     TokensModule
     
     TokensModule
     
     
    -
    +
     SharedModule->TokensModule
     
     
    @@ -369,13 +381,13 @@
     
     
     
    -
    +
     TransactionDetailsComponent 
     
     TransactionDetailsComponent 
     
     
    -
    +
     TransactionsModule->TransactionDetailsComponent 
     
     
    @@ -593,167 +605,179 @@
     
     
     ErrorDialogComponent
    -
    -ErrorDialogComponent
    +
    +ErrorDialogComponent
     
     
     
     ErrorDialogComponent->SharedModule
    -
    -
    +
    +
     
     
     
     FooterComponent
    -
    -FooterComponent
    +
    +FooterComponent
     
     
     
     FooterComponent->SharedModule
    -
    -
    +
    +
     
     
     
     MenuSelectionDirective
    -
    -MenuSelectionDirective
    +
    +MenuSelectionDirective
     
     
     
     MenuSelectionDirective->SharedModule
    -
    -
    +
    +
     
     
     
     MenuToggleDirective
    -
    -MenuToggleDirective
    +
    +MenuToggleDirective
     
     
     
     MenuToggleDirective->SharedModule
    -
    -
    +
    +
    +
    +
    +
    +NetworkStatusComponent
    +
    +NetworkStatusComponent
    +
    +
    +
    +NetworkStatusComponent->SharedModule
    +
    +
     
     
    -
    +
     SafePipe
     
     SafePipe
     
     
    -
    +
     SafePipe->SharedModule
    -
    -
    +
    +
     
     
    -
    +
     SidebarComponent
     
     SidebarComponent
     
     
    -
    +
     SidebarComponent->SharedModule
    -
    -
    +
    +
     
     
    -
    +
     TokenRatioPipe
    -
    -TokenRatioPipe
    +
    +TokenRatioPipe
     
     
    -
    +
     TokenRatioPipe->SharedModule
    -
    -
    +
    +
     
     
    -
    +
     TopbarComponent
    -
    -TopbarComponent
    +
    +TopbarComponent
     
     
    -
    +
     TopbarComponent->SharedModule
    -
    -
    +
    +
     
     
    -
    +
     TokenDetailsComponent
     
     TokenDetailsComponent
     
     
    -
    +
     TokenDetailsComponent->TokensModule
     
     
     
     
    -
    +
     TokensComponent
     
     TokensComponent
     
     
    -
    +
     TokensComponent->TokensModule
     
     
     
     
    -
    +
     TokensRoutingModule
     
     TokensRoutingModule
     
     
    -
    +
     TokensRoutingModule->TokensModule
     
     
     
     
    -
    +
     TransactionDetailsComponent
     
     TransactionDetailsComponent
     
     
    -
    +
     TransactionDetailsComponent->TransactionsModule
     
     
     
     
    -
    +
     TransactionsComponent
     
     TransactionsComponent
     
     
    -
    +
     TransactionsComponent->TransactionsModule
     
     
     
     
    -
    +
     TransactionsRoutingModule
     
     TransactionsRoutingModule
     
     
    -
    +
     TransactionsRoutingModule->TransactionsModule
     
     
    diff --git a/docs/compodoc/guards/AuthGuard.html b/docs/compodoc/guards/AuthGuard.html
    index 9d539d0..18885ce 100644
    --- a/docs/compodoc/guards/AuthGuard.html
    +++ b/docs/compodoc/guards/AuthGuard.html
    @@ -72,11 +72,6 @@ Dictates access to routes depending on the authentication status.

    -

    -

    Example

    -

    -
    -

    Index

    @@ -117,7 +112,7 @@ Dictates access to routes depending on the authentication status.

    - + @@ -191,8 +186,8 @@ Dictates access to routes depending on the authentication status.

    - + @@ -275,7 +270,13 @@ ActivatedRouteSnapshot can also be used to traverse the router state tree.
  • import { Injectable } from '@angular/core';
    -import {ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree} from '@angular/router';
    +import {
    +  ActivatedRouteSnapshot,
    +  CanActivate,
    +  Router,
    +  RouterStateSnapshot,
    +  UrlTree,
    +} from '@angular/router';
     
     // Third party imports
     import { Observable } from 'rxjs';
    @@ -283,14 +284,11 @@ import { Observable } from 'rxjs';
     /**
      * Auth guard implementation.
      * Dictates access to routes depending on the authentication status.
    - *
    - * @implements CanActivate
      */
     @Injectable({
    -  providedIn: 'root'
    +  providedIn: 'root',
     })
     export class AuthGuard implements CanActivate {
    -
       /**
        * Instantiates the auth guard class.
        *
    @@ -309,14 +307,14 @@ export class AuthGuard implements CanActivate {
        */
       canActivate(
         route: ActivatedRouteSnapshot,
    -    state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
    +    state: RouterStateSnapshot
    +  ): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
         if (localStorage.getItem(btoa('CICADA_PRIVATE_KEY'))) {
           return true;
         }
         this.router.navigate(['/auth']);
         return false;
       }
    -
     }
     
    diff --git a/docs/compodoc/guards/RoleGuard.html b/docs/compodoc/guards/RoleGuard.html index 7869ed3..ad542b2 100644 --- a/docs/compodoc/guards/RoleGuard.html +++ b/docs/compodoc/guards/RoleGuard.html @@ -72,11 +72,6 @@ Dictates access to routes depending on the user's role.

    -

    -

    Example

    -

    -
    -

    Index

    @@ -117,7 +112,7 @@ Dictates access to routes depending on the user's role.

    - + @@ -191,8 +186,8 @@ Dictates access to routes depending on the user's role.

    - + @@ -275,7 +270,13 @@ ActivatedRouteSnapshot can also be used to traverse the router state tree.
    import { Injectable } from '@angular/core';
    -import {ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree} from '@angular/router';
    +import {
    +  ActivatedRouteSnapshot,
    +  CanActivate,
    +  Router,
    +  RouterStateSnapshot,
    +  UrlTree,
    +} from '@angular/router';
     
     // Third party imports
     import { Observable } from 'rxjs';
    @@ -283,14 +284,11 @@ import { Observable } from 'rxjs';
     /**
      * Role guard implementation.
      * Dictates access to routes depending on the user's role.
    - *
    - * @implements CanActivate
      */
     @Injectable({
    -  providedIn: 'root'
    +  providedIn: 'root',
     })
     export class RoleGuard implements CanActivate {
    -
       /**
        * Instantiates the role guard class.
        *
    @@ -309,7 +307,8 @@ export class RoleGuard implements CanActivate {
        */
       canActivate(
         route: ActivatedRouteSnapshot,
    -    state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
    +    state: RouterStateSnapshot
    +  ): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
         const currentUser = JSON.parse(localStorage.getItem(atob('CICADA_USER')));
         if (currentUser) {
           if (route.data.roles && route.data.roles.indexOf(currentUser.role) === -1) {
    @@ -319,10 +318,9 @@ export class RoleGuard implements CanActivate {
           return true;
         }
     
    -    this.router.navigate(['/auth'], { queryParams: { returnUrl: state.url }});
    +    this.router.navigate(['/auth'], { queryParams: { returnUrl: state.url } });
         return false;
       }
    -
     }
     
    diff --git a/docs/compodoc/images/coverage-badge-documentation.svg b/docs/compodoc/images/coverage-badge-documentation.svg index 24a7cd7..7c85f31 100644 --- a/docs/compodoc/images/coverage-badge-documentation.svg +++ b/docs/compodoc/images/coverage-badge-documentation.svg @@ -4,6 +4,6 @@ documentation - 30% + 29% diff --git a/docs/compodoc/injectables/AuthService.html b/docs/compodoc/injectables/AuthService.html index 5a96413..7bbb3c7 100644 --- a/docs/compodoc/injectables/AuthService.html +++ b/docs/compodoc/injectables/AuthService.html @@ -289,8 +289,8 @@ - + @@ -330,8 +330,8 @@ - + @@ -369,8 +369,8 @@ - + @@ -488,8 +488,8 @@ - + @@ -529,8 +529,8 @@ - + @@ -599,8 +599,8 @@ - + @@ -638,8 +638,8 @@ - + @@ -749,8 +749,8 @@ - + @@ -957,18 +957,18 @@
    -
    import {Injectable} from '@angular/core';
    -import {hobaParseChallengeHeader} from '@src/assets/js/hoba.js';
    -import {signChallenge} from '@src/assets/js/hoba-pgp.js';
    -import {environment} from '@src/environments/environment';
    -import {LoggingService} from '@app/_services/logging.service';
    -import {MutableKeyStore, MutablePgpKeyStore} from '@app/_pgp';
    -import {ErrorDialogService} from '@app/_services/error-dialog.service';
    -import {HttpClient} from '@angular/common/http';
    -import {HttpError} from '@app/_helpers/global-error-handler';
    +        
    import { Injectable } from '@angular/core';
    +import { hobaParseChallengeHeader } from '@src/assets/js/hoba.js';
    +import { signChallenge } from '@src/assets/js/hoba-pgp.js';
    +import { environment } from '@src/environments/environment';
    +import { LoggingService } from '@app/_services/logging.service';
    +import { MutableKeyStore, MutablePgpKeyStore } from '@app/_pgp';
    +import { ErrorDialogService } from '@app/_services/error-dialog.service';
    +import { HttpClient } from '@angular/common/http';
    +import { HttpError } from '@app/_helpers/global-error-handler';
     
     @Injectable({
    -  providedIn: 'root'
    +  providedIn: 'root',
     })
     export class AuthService {
       sessionToken: any;
    @@ -1027,8 +1027,8 @@ export class AuthService {
           xhr.setRequestHeader('x-cic-automerge', 'none');
           xhr.addEventListener('load', (e) => {
             if (xhr.status !== 200) {
    -            const error = new HttpError(xhr.statusText, xhr.status);
    -            return reject(error);
    +          const error = new HttpError(xhr.statusText, xhr.status);
    +          return reject(error);
             }
             this.sessionToken = xhr.getResponseHeader('Token');
             sessionStorage.setItem(btoa('CICADA_SESSION_TOKEN'), this.sessionToken);
    @@ -1054,50 +1054,53 @@ export class AuthService {
         xhr.send();
       }
     
    -
       login(): boolean {
         if (this.sessionToken !== undefined) {
           try {
             this.getWithToken();
             return true;
           } catch (e) {
    -        this.loggingService.sendErrorLevelMessage('Login token failed', this, {error: e});
    +        this.loggingService.sendErrorLevelMessage('Login token failed', this, { error: e });
           }
         } else {
           try {
             this.getChallenge();
           } catch (e) {
    -        this.loggingService.sendErrorLevelMessage('Login challenge failed', this, {error: e});
    +        this.loggingService.sendErrorLevelMessage('Login challenge failed', this, { error: e });
           }
         }
         return false;
       }
     
    -
    -  async loginResponse(o: { challenge: string, realm: any }): Promise<any> {
    +  async loginResponse(o: { challenge: string; realm: any }): Promise<any> {
         return new Promise(async (resolve, reject) => {
           try {
    -        const r = await signChallenge(o.challenge,
    -                                      o.realm,
    -                                      environment.cicMetaUrl,
    -                                      this.mutableKeyStore);
    +        const r = await signChallenge(
    +          o.challenge,
    +          o.realm,
    +          environment.cicMetaUrl,
    +          this.mutableKeyStore
    +        );
             const sessionTokenResult: boolean = await this.sendResponse(r);
           } catch (error) {
             if (error instanceof HttpError) {
               if (error.status === 403) {
    -            this.errorDialogService.openDialog({ message: 'You are not authorized to use this system' });
    +            this.errorDialogService.openDialog({
    +              message: 'You are not authorized to use this system',
    +            });
               }
               if (error.status === 401) {
                 this.errorDialogService.openDialog({
    -              message: 'Unable to authenticate with the service. ' +
    +              message:
    +                'Unable to authenticate with the service. ' +
                     'Please speak with the staff at Grassroots ' +
                     'Economics for requesting access ' +
    -                'staff@grassrootseconomics.net.'
    +                'staff@grassrootseconomics.net.',
                 });
               }
             }
             // TODO define this error
    -        this.errorDialogService.openDialog({message: 'Incorrect key passphrase.'});
    +        this.errorDialogService.openDialog({ message: 'Incorrect key passphrase.' });
             resolve(false);
           }
         });
    @@ -1109,10 +1112,6 @@ export class AuthService {
         this.setState('Click button to log in with PGP key ' + this.mutableKeyStore.getPrivateKeyId());
       }
     
    -  /**
    -   * @throws
    -   * @param privateKeyArmored
    -   */
       async setKey(privateKeyArmored): Promise<boolean> {
         try {
           const isValidKeyCheck = await this.mutableKeyStore.isValidKey(privateKeyArmored);
    @@ -1127,7 +1126,11 @@ export class AuthService {
           const key = await this.mutableKeyStore.importPrivateKey(privateKeyArmored);
           localStorage.setItem(btoa('CICADA_PRIVATE_KEY'), privateKeyArmored);
         } catch (err) {
    -      this.loggingService.sendErrorLevelMessage(`Failed to set key: ${err.message || err.statusText}`, this, {error: err});
    +      this.loggingService.sendErrorLevelMessage(
    +        `Failed to set key: ${err.message || err.statusText}`,
    +        this,
    +        { error: err }
    +      );
           this.errorDialogService.openDialog({
             message: `Failed to set key: ${err.message || err.statusText}`,
           });
    @@ -1140,28 +1143,27 @@ export class AuthService {
       logout(): void {
         sessionStorage.removeItem(btoa('CICADA_SESSION_TOKEN'));
         this.sessionToken = undefined;
    -    window.location.reload(true);
    +    window.location.reload();
       }
     
       getTrustedUsers(): any {
         const trustedUsers: Array<any> = [];
    -    this.mutableKeyStore.getPublicKeys().forEach(key => trustedUsers.push(key.users[0].userId));
    +    this.mutableKeyStore.getPublicKeys().forEach((key) => trustedUsers.push(key.users[0].userId));
         return trustedUsers;
       }
     
       async getPublicKeys(): Promise<any> {
    -    return await fetch(environment.publicKeysUrl)
    -      .then(res => {
    -        if (!res.ok) {
    -          // TODO does angular recommend an error interface?
    -          throw Error(`${res.statusText} - ${res.status}`);
    -        }
    -        return res.text();
    -      });
    +    return await fetch(environment.publicKeysUrl).then((res) => {
    +      if (!res.ok) {
    +        // TODO does angular recommend an error interface?
    +        throw Error(`${res.statusText} - ${res.status}`);
    +      }
    +      return res.text();
    +    });
       }
     
       getPrivateKey(): any {
    -      return this.mutableKeyStore.getPrivateKey();
    +    return this.mutableKeyStore.getPrivateKey();
       }
     }
     
    diff --git a/docs/compodoc/injectables/BlockSyncService.html b/docs/compodoc/injectables/BlockSyncService.html index 4d86693..1c7bbbb 100644 --- a/docs/compodoc/injectables/BlockSyncService.html +++ b/docs/compodoc/injectables/BlockSyncService.html @@ -327,8 +327,8 @@ - + @@ -409,8 +409,8 @@ - + @@ -479,8 +479,8 @@ - + @@ -669,8 +669,8 @@ - + @@ -853,17 +853,17 @@
    -
    import {Injectable} from '@angular/core';
    -import {Settings} from '@app/_models';
    -import {TransactionHelper} from 'cic-client';
    -import {first} from 'rxjs/operators';
    -import {TransactionService} from '@app/_services/transaction.service';
    -import {environment} from '@src/environments/environment';
    -import {LoggingService} from '@app/_services/logging.service';
    -import {RegistryService} from '@app/_services/registry.service';
    +        
    import { Injectable } from '@angular/core';
    +import { Settings } from '@app/_models';
    +import { TransactionHelper } from 'cic-client';
    +import { first } from 'rxjs/operators';
    +import { TransactionService } from '@app/_services/transaction.service';
    +import { environment } from '@src/environments/environment';
    +import { LoggingService } from '@app/_services/logging.service';
    +import { RegistryService } from '@app/_services/registry.service';
     
     @Injectable({
    -  providedIn: 'root'
    +  providedIn: 'root',
     })
     export class BlockSyncService {
       readyStateTarget: number = 2;
    @@ -872,8 +872,8 @@ export class BlockSyncService {
       constructor(
         private transactionService: TransactionService,
         private loggingService: LoggingService,
    -    private registryService: RegistryService,
    -  ) { }
    +    private registryService: RegistryService
    +  ) {}
     
       blockSync(address: string = null, offset: number = 0, limit: number = 100): void {
         this.transactionService.resetTransactionsList();
    @@ -898,7 +898,14 @@ export class BlockSyncService {
         settings.registry.load();
       }
     
    -  readyStateProcessor(settings: Settings, bit: number, address: string, offset: number, limit: number): void {
    +  readyStateProcessor(
    +    settings: Settings,
    +    bit: number,
    +    address: string,
    +    offset: number,
    +    limit: number
    +  ): void {
    +    // tslint:disable-next-line:no-bitwise
         this.readyState |= bit;
         if (this.readyStateTarget === this.readyState && this.readyStateTarget) {
           const wHeadSync: Worker = new Worker('./../assets/js/block-sync/head.js');
    @@ -909,13 +916,19 @@ export class BlockSyncService {
             w3_provider: settings.w3.provider,
           });
           if (address === null) {
    -        this.transactionService.getAllTransactions(offset, limit).pipe(first()).subscribe(res => {
    -          this.fetcher(settings, res);
    -        });
    +        this.transactionService
    +          .getAllTransactions(offset, limit)
    +          .pipe(first())
    +          .subscribe((res) => {
    +            this.fetcher(settings, res);
    +          });
           } else {
    -        this.transactionService.getAddressTransactions(address, offset, limit).pipe(first()).subscribe(res => {
    -          this.fetcher(settings, res);
    -        });
    +        this.transactionService
    +          .getAddressTransactions(address, offset, limit)
    +          .pipe(first())
    +          .subscribe((res) => {
    +            this.fetcher(settings, res);
    +          });
           }
         }
       }
    @@ -936,7 +949,14 @@ export class BlockSyncService {
         });
       }
     
    -  async scan(settings: Settings, lo: number, hi: number, bloomBlockBytes: Uint8Array, bloomBlocktxBytes: Uint8Array, bloomRounds: any): Promise<void> {
    +  async scan(
    +    settings: Settings,
    +    lo: number,
    +    hi: number,
    +    bloomBlockBytes: Uint8Array,
    +    bloomBlocktxBytes: Uint8Array,
    +    bloomRounds: any
    +  ): Promise<void> {
         const w: Worker = new Worker('./../assets/js/block-sync/ondemand.js');
         w.onmessage = (m) => {
           settings.txHelper.processReceipt(m.data);
    @@ -945,10 +965,7 @@ export class BlockSyncService {
           w3_provider: settings.w3.provider,
           lo,
           hi,
    -      filters: [
    -        bloomBlockBytes,
    -        bloomBlocktxBytes,
    -      ],
    +      filters: [bloomBlockBytes, bloomBlocktxBytes],
           filter_rounds: bloomRounds,
         });
       }
    @@ -956,13 +973,20 @@ export class BlockSyncService {
       fetcher(settings: Settings, transactionsInfo: any): void {
         const blockFilterBinstr: string = window.atob(transactionsInfo.block_filter);
         const bOne: Uint8Array = new Uint8Array(blockFilterBinstr.length);
    -    bOne.map((e, i, v) => v[i] = blockFilterBinstr.charCodeAt(i));
    +    bOne.map((e, i, v) => (v[i] = blockFilterBinstr.charCodeAt(i)));
     
         const blocktxFilterBinstr: string = window.atob(transactionsInfo.blocktx_filter);
         const bTwo: Uint8Array = new Uint8Array(blocktxFilterBinstr.length);
    -    bTwo.map((e, i, v) => v[i] = blocktxFilterBinstr.charCodeAt(i));
    +    bTwo.map((e, i, v) => (v[i] = blocktxFilterBinstr.charCodeAt(i)));
     
    -    settings.scanFilter(settings, transactionsInfo.low, transactionsInfo.high, bOne, bTwo, transactionsInfo.filter_rounds);
    +    settings.scanFilter(
    +      settings,
    +      transactionsInfo.low,
    +      transactionsInfo.high,
    +      bOne,
    +      bTwo,
    +      transactionsInfo.filter_rounds
    +    );
       }
     }
     
    diff --git a/docs/compodoc/injectables/ErrorDialogService.html b/docs/compodoc/injectables/ErrorDialogService.html index a3892de..44bfd1d 100644 --- a/docs/compodoc/injectables/ErrorDialogService.html +++ b/docs/compodoc/injectables/ErrorDialogService.html @@ -185,8 +185,8 @@ - + @@ -256,7 +256,7 @@ - + @@ -303,18 +303,16 @@
    import { Injectable } from '@angular/core';
    -import {MatDialog, MatDialogRef} from '@angular/material/dialog';
    -import {ErrorDialogComponent} from '@app/shared/error-dialog/error-dialog.component';
    +import { MatDialog, MatDialogRef } from '@angular/material/dialog';
    +import { ErrorDialogComponent } from '@app/shared/error-dialog/error-dialog.component';
     
     @Injectable({
    -  providedIn: 'root'
    +  providedIn: 'root',
     })
     export class ErrorDialogService {
       public isDialogOpen: boolean = false;
     
    -  constructor(
    -    public dialog: MatDialog,
    -  ) { }
    +  constructor(public dialog: MatDialog) {}
     
       openDialog(data): any {
         if (this.isDialogOpen) {
    @@ -323,10 +321,10 @@ export class ErrorDialogService {
         this.isDialogOpen = true;
         const dialogRef: MatDialogRef<any> = this.dialog.open(ErrorDialogComponent, {
           width: '300px',
    -      data
    +      data,
         });
     
    -    dialogRef.afterClosed().subscribe(() => this.isDialogOpen = false);
    +    dialogRef.afterClosed().subscribe(() => (this.isDialogOpen = false));
       }
     }
     
    diff --git a/docs/compodoc/injectables/GlobalErrorHandler.html b/docs/compodoc/injectables/GlobalErrorHandler.html index cbb18ad..f3cfe03 100644 --- a/docs/compodoc/injectables/GlobalErrorHandler.html +++ b/docs/compodoc/injectables/GlobalErrorHandler.html @@ -141,7 +141,7 @@ - + @@ -233,8 +233,8 @@ - + @@ -314,8 +314,8 @@ - + @@ -394,8 +394,8 @@ - + @@ -483,7 +483,7 @@ - + @@ -502,12 +502,12 @@
    -
    import {HttpErrorResponse} from '@angular/common/http';
    -import {ErrorHandler, Injectable} from '@angular/core';
    -import {Router} from '@angular/router';
    +        
    import { HttpErrorResponse } from '@angular/common/http';
    +import { ErrorHandler, Injectable } from '@angular/core';
    +import { Router } from '@angular/router';
     
     // Application imports
    -import {LoggingService} from '@app/_services/logging.service';
    +import { LoggingService } from '@app/_services/logging.service';
     
     /**
      * A generalized http response error.
    @@ -540,7 +540,6 @@ export class HttpError extends Error {
     export class GlobalErrorHandler extends ErrorHandler {
       /**
        * An array of sentence sections that denote warnings.
    -   * @private
        */
       private sentencesForWarningLogging: Array<string> = [];
     
    @@ -550,10 +549,7 @@ export class GlobalErrorHandler extends ErrorHandler {
        * @param loggingService - A service that provides logging capabilities.
        * @param router - A service that provides navigation among views and URL manipulation capabilities.
        */
    -  constructor(
    -    private loggingService: LoggingService,
    -    private router: Router
    -  ) {
    +  constructor(private loggingService: LoggingService, private router: Router) {
         super();
       }
     
    @@ -574,9 +570,9 @@ export class GlobalErrorHandler extends ErrorHandler {
     
         const isWarning: boolean = this.isWarning(errorTraceString);
         if (isWarning) {
    -      this.loggingService.sendWarnLevelMessage(errorTraceString, {error});
    +      this.loggingService.sendWarnLevelMessage(errorTraceString, { error });
         } else {
    -      this.loggingService.sendErrorLevelMessage(errorTraceString, this, {error});
    +      this.loggingService.sendErrorLevelMessage(errorTraceString, this, { error });
         }
     
         throw error;
    @@ -587,7 +583,6 @@ export class GlobalErrorHandler extends ErrorHandler {
        *
        * @param errorTraceString - A description of the error and it's stack trace.
        * @returns true - If the error is of type warning.
    -   * @private
        */
       private isWarning(errorTraceString: string): boolean {
         let isWarning: boolean = true;
    @@ -613,14 +608,30 @@ export class GlobalErrorHandler extends ErrorHandler {
         const route: string = this.router.url;
         if (error instanceof HttpErrorResponse) {
           this.loggingService.sendErrorLevelMessage(
    -        `There was an HTTP error on route ${route}.\n${error.message}.\nStatus code: ${(error as HttpErrorResponse).status}`,
    -        this, {error});
    +        `There was an HTTP error on route ${route}.\n${error.message}.\nStatus code: ${
    +          (error as HttpErrorResponse).status
    +        }`,
    +        this,
    +        { error }
    +      );
         } else if (error instanceof TypeError) {
    -      this.loggingService.sendErrorLevelMessage(`There was a Type error on route ${route}.\n${error.message}`, this, {error});
    +      this.loggingService.sendErrorLevelMessage(
    +        `There was a Type error on route ${route}.\n${error.message}`,
    +        this,
    +        { error }
    +      );
         } else if (error instanceof Error) {
    -      this.loggingService.sendErrorLevelMessage(`There was a general error on route ${route}.\n${error.message}`, this, {error});
    +      this.loggingService.sendErrorLevelMessage(
    +        `There was a general error on route ${route}.\n${error.message}`,
    +        this,
    +        { error }
    +      );
         } else {
    -      this.loggingService.sendErrorLevelMessage(`Nobody threw an error but something happened on route ${route}!`, this, {error});
    +      this.loggingService.sendErrorLevelMessage(
    +        `Nobody threw an error but something happened on route ${route}!`,
    +        this,
    +        { error }
    +      );
         }
       }
     }
    diff --git a/docs/compodoc/injectables/LocationService.html b/docs/compodoc/injectables/LocationService.html
    index 97e798b..adc780d 100644
    --- a/docs/compodoc/injectables/LocationService.html
    +++ b/docs/compodoc/injectables/LocationService.html
    @@ -175,8 +175,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -245,8 +245,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -284,8 +284,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -354,8 +354,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -378,19 +378,16 @@
     
         
    import { Injectable } from '@angular/core';
    -import {Observable} from 'rxjs';
    -import {environment} from '@src/environments/environment';
    -import {first} from 'rxjs/operators';
    -import {HttpClient} from '@angular/common/http';
    +import { Observable } from 'rxjs';
    +import { environment } from '@src/environments/environment';
    +import { first } from 'rxjs/operators';
    +import { HttpClient } from '@angular/common/http';
     
     @Injectable({
    -  providedIn: 'root'
    +  providedIn: 'root',
     })
     export class LocationService {
    -
    -  constructor(
    -    private httpClient: HttpClient,
    -  ) { }
    +  constructor(private httpClient: HttpClient) {}
     
       getAreaNames(): Observable<any> {
         return this.httpClient.get(`${environment.cicMetaUrl}/areanames`);
    @@ -405,7 +402,9 @@ export class LocationService {
       }
     
       getAreaTypeByArea(area: string): Observable<any> {
    -    return this.httpClient.get(`${environment.cicMetaUrl}/areatypes/${area.toLowerCase()}`).pipe(first());
    +    return this.httpClient
    +      .get(`${environment.cicMetaUrl}/areatypes/${area.toLowerCase()}`)
    +      .pipe(first());
       }
     }
     
    diff --git a/docs/compodoc/injectables/LoggingService.html b/docs/compodoc/injectables/LoggingService.html index c801b62..e1d397a 100644 --- a/docs/compodoc/injectables/LoggingService.html +++ b/docs/compodoc/injectables/LoggingService.html @@ -867,11 +867,11 @@
    -
    import {Injectable, isDevMode} from '@angular/core';
    -import {NGXLogger} from 'ngx-logger';
    +        
    import { Injectable, isDevMode } from '@angular/core';
    +import { NGXLogger } from 'ngx-logger';
     
     @Injectable({
    -  providedIn: 'root'
    +  providedIn: 'root',
     })
     export class LoggingService {
       env: string;
    diff --git a/docs/compodoc/injectables/RegistryService.html b/docs/compodoc/injectables/RegistryService.html
    index ec2b485..ef32bd9 100644
    --- a/docs/compodoc/injectables/RegistryService.html
    +++ b/docs/compodoc/injectables/RegistryService.html
    @@ -124,7 +124,7 @@
                     
                             
                                 
    -                                
    +                                
                                 
                             
     
    @@ -159,8 +159,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -198,8 +198,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -273,8 +273,13 @@
                         
                         
                             
    -                            Default value : new CICRegistry(this.web3, environment.registryAddress, 'CICRegistry', this.fileGetter,
    -    ['../../assets/js/block-sync/data'])
    +                            Default value : new CICRegistry(
    +    this.web3,
    +    environment.registryAddress,
    +    'CICRegistry',
    +    this.fileGetter,
    +    ['../../assets/js/block-sync/data']
    +  )
                             
                         
                             
    @@ -326,18 +331,23 @@
         
    import { Injectable } from '@angular/core';
     import Web3 from 'web3';
    -import {environment} from '@src/environments/environment';
    -import {CICRegistry, FileGetter} from 'cic-client';
    -import {HttpGetter} from '@app/_helpers';
    +import { environment } from '@src/environments/environment';
    +import { CICRegistry, FileGetter } from 'cic-client';
    +import { HttpGetter } from '@app/_helpers';
     
     @Injectable({
    -  providedIn: 'root'
    +  providedIn: 'root',
     })
     export class RegistryService {
       web3: Web3 = new Web3(environment.web3Provider);
       fileGetter: FileGetter = new HttpGetter();
    -  registry: CICRegistry = new CICRegistry(this.web3, environment.registryAddress, 'CICRegistry', this.fileGetter,
    -    ['../../assets/js/block-sync/data']);
    +  registry: CICRegistry = new CICRegistry(
    +    this.web3,
    +    environment.registryAddress,
    +    'CICRegistry',
    +    this.fileGetter,
    +    ['../../assets/js/block-sync/data']
    +  );
     
       constructor() {
         this.registry.declaratorHelper.addTrust(environment.trustedDeclaratorAddress);
    diff --git a/docs/compodoc/injectables/TokenService.html b/docs/compodoc/injectables/TokenService.html
    index 334e1aa..10c6e33 100644
    --- a/docs/compodoc/injectables/TokenService.html
    +++ b/docs/compodoc/injectables/TokenService.html
    @@ -208,8 +208,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -278,8 +278,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -350,8 +350,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -466,36 +466,35 @@
     
         
    import { EventEmitter, Injectable } from '@angular/core';
    -import {environment} from '@src/environments/environment';
    -import {BehaviorSubject, Observable} from 'rxjs';
    -import {CICRegistry} from 'cic-client';
    -import {TokenRegistry} from '@app/_eth';
    -import {HttpClient} from '@angular/common/http';
    -import {RegistryService} from '@app/_services/registry.service';
    +import { environment } from '@src/environments/environment';
    +import { BehaviorSubject, Observable } from 'rxjs';
    +import { CICRegistry } from 'cic-client';
    +import { TokenRegistry } from '@app/_eth';
    +import { HttpClient } from '@angular/common/http';
    +import { RegistryService } from '@app/_services/registry.service';
     
     @Injectable({
    -  providedIn: 'root'
    +  providedIn: 'root',
     })
     export class TokenService {
       registry: CICRegistry;
       tokenRegistry: TokenRegistry;
       LoadEvent: EventEmitter<number> = new EventEmitter<number>();
     
    -  constructor(
    -    private httpClient: HttpClient,
    -    private registryService: RegistryService,
    -  ) {
    +  constructor(private httpClient: HttpClient, private registryService: RegistryService) {
         this.registry = registryService.getRegistry();
         this.registry.load();
         this.registry.onload = async (address: string): Promise<void> => {
    -      this.tokenRegistry = new TokenRegistry(await this.registry.getContractAddressByName('TokenRegistry'));
    +      this.tokenRegistry = new TokenRegistry(
    +        await this.registry.getContractAddressByName('TokenRegistry')
    +      );
           this.LoadEvent.next(Date.now());
         };
       }
     
       async getTokens(): Promise<Array<Promise<string>>> {
         const count: number = await this.tokenRegistry.totalTokens();
    -    return Array.from({length: count}, async (v, i) => await this.tokenRegistry.entry(i));
    +    return Array.from({ length: count }, async (v, i) => await this.tokenRegistry.entry(i));
       }
     
       getTokenBySymbol(symbol: string): Observable<any> {
    diff --git a/docs/compodoc/injectables/TransactionService.html b/docs/compodoc/injectables/TransactionService.html
    index f307d55..7066c73 100644
    --- a/docs/compodoc/injectables/TransactionService.html
    +++ b/docs/compodoc/injectables/TransactionService.html
    @@ -268,8 +268,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -349,8 +349,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -595,8 +595,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -636,8 +636,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -796,8 +796,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -1059,28 +1059,28 @@
     
         
    import { Injectable } from '@angular/core';
    -import {first} from 'rxjs/operators';
    -import {BehaviorSubject, Observable} from 'rxjs';
    -import {environment} from '@src/environments/environment';
    -import {Envelope, User} from 'cic-client-meta';
    -import {UserService} from '@app/_services/user.service';
    +import { first } from 'rxjs/operators';
    +import { BehaviorSubject, Observable } from 'rxjs';
    +import { environment } from '@src/environments/environment';
    +import { Envelope, User } from 'cic-client-meta';
    +import { UserService } from '@app/_services/user.service';
     import { Keccak } from 'sha3';
     import { utils } from 'ethers';
    -import {add0x, fromHex, strip0x, toHex} from '@src/assets/js/ethtx/dist/hex';
    -import {Tx} from '@src/assets/js/ethtx/dist';
    -import {toValue} from '@src/assets/js/ethtx/dist/tx';
    +import { add0x, fromHex, strip0x, toHex } from '@src/assets/js/ethtx/dist/hex';
    +import { Tx } from '@src/assets/js/ethtx/dist';
    +import { toValue } from '@src/assets/js/ethtx/dist/tx';
     import * as secp256k1 from 'secp256k1';
    -import {AuthService} from '@app/_services/auth.service';
    -import {defaultAccount} from '@app/_models';
    -import {LoggingService} from '@app/_services/logging.service';
    -import {HttpClient} from '@angular/common/http';
    -import {CICRegistry} from 'cic-client';
    -import {RegistryService} from '@app/_services/registry.service';
    +import { AuthService } from '@app/_services/auth.service';
    +import { defaultAccount } from '@app/_models';
    +import { LoggingService } from '@app/_services/logging.service';
    +import { HttpClient } from '@angular/common/http';
    +import { CICRegistry } from 'cic-client';
    +import { RegistryService } from '@app/_services/registry.service';
     import Web3 from 'web3';
     const vCard = require('vcard-parser');
     
     @Injectable({
    -  providedIn: 'root'
    +  providedIn: 'root',
     })
     export class TransactionService {
       transactions: any[] = [];
    @@ -1095,7 +1095,7 @@ export class TransactionService {
         private authService: AuthService,
         private userService: UserService,
         private loggingService: LoggingService,
    -    private registryService: RegistryService,
    +    private registryService: RegistryService
       ) {
         this.web3 = this.registryService.getWeb3();
         this.registry = registryService.getRegistry();
    @@ -1111,36 +1111,58 @@ export class TransactionService {
       }
     
       async setTransaction(transaction, cacheSize: number): Promise<void> {
    -    if (this.transactions.find(cachedTx => cachedTx.tx.txHash === transaction.tx.txHash)) { return; }
    +    if (this.transactions.find((cachedTx) => cachedTx.tx.txHash === transaction.tx.txHash)) {
    +      return;
    +    }
         transaction.value = Number(transaction.value);
         transaction.type = 'transaction';
         try {
    -      this.userService.getAccountDetailsFromMeta(await User.toKey(transaction.from)).pipe(first()).subscribe((res) => {
    -        transaction.sender = this.getAccountInfo(res.body);
    -      }, error => {
    -        transaction.sender = defaultAccount;
    -      });
    -      this.userService.getAccountDetailsFromMeta(await User.toKey(transaction.to)).pipe(first()).subscribe((res) => {
    -        transaction.recipient = this.getAccountInfo(res.body);
    -      }, error => {
    -        transaction.recipient = defaultAccount;
    -      });
    +      this.userService
    +        .getAccountDetailsFromMeta(await User.toKey(transaction.from))
    +        .pipe(first())
    +        .subscribe(
    +          (res) => {
    +            transaction.sender = this.getAccountInfo(res.body);
    +          },
    +          (error) => {
    +            transaction.sender = defaultAccount;
    +          }
    +        );
    +      this.userService
    +        .getAccountDetailsFromMeta(await User.toKey(transaction.to))
    +        .pipe(first())
    +        .subscribe(
    +          (res) => {
    +            transaction.recipient = this.getAccountInfo(res.body);
    +          },
    +          (error) => {
    +            transaction.recipient = defaultAccount;
    +          }
    +        );
         } finally {
           this.addTransaction(transaction, cacheSize);
         }
       }
     
       async setConversion(conversion, cacheSize): Promise<void> {
    -    if (this.transactions.find(cachedTx => cachedTx.tx.txHash === conversion.tx.txHash)) { return; }
    +    if (this.transactions.find((cachedTx) => cachedTx.tx.txHash === conversion.tx.txHash)) {
    +      return;
    +    }
         conversion.type = 'conversion';
         conversion.fromValue = Number(conversion.fromValue);
         conversion.toValue = Number(conversion.toValue);
         try {
    -      this.userService.getAccountDetailsFromMeta(await User.toKey(conversion.trader)).pipe(first()).subscribe((res) => {
    -        conversion.sender = conversion.recipient = this.getAccountInfo(res.body);
    -      }, error => {
    -        conversion.sender = conversion.recipient = defaultAccount;
    -      });
    +      this.userService
    +        .getAccountDetailsFromMeta(await User.toKey(conversion.trader))
    +        .pipe(first())
    +        .subscribe(
    +          (res) => {
    +            conversion.sender = conversion.recipient = this.getAccountInfo(res.body);
    +          },
    +          (error) => {
    +            conversion.sender = conversion.recipient = defaultAccount;
    +          }
    +        );
         } finally {
           this.addTransaction(conversion, cacheSize);
         }
    @@ -1160,19 +1182,29 @@ export class TransactionService {
       }
     
       getAccountInfo(account: string): any {
    -    let accountInfo = Envelope.fromJSON(JSON.stringify(account)).unwrap().m.data;
    +    const accountInfo = Envelope.fromJSON(JSON.stringify(account)).unwrap().m.data;
         accountInfo.vcard = vCard.parse(atob(accountInfo.vcard));
         return accountInfo;
       }
     
    -  async transferRequest(tokenAddress: string, senderAddress: string, recipientAddress: string, value: number): Promise<any> {
    -    const transferAuthAddress = await this.registry.getContractAddressByName('TransferAuthorization');
    +  async transferRequest(
    +    tokenAddress: string,
    +    senderAddress: string,
    +    recipientAddress: string,
    +    value: number
    +  ): Promise<any> {
    +    const transferAuthAddress = await this.registry.getContractAddressByName(
    +      'TransferAuthorization'
    +    );
         const hashFunction = new Keccak(256);
         hashFunction.update('createRequest(address,address,address,uint256)');
         const hash = hashFunction.digest();
         const methodSignature = hash.toString('hex').substring(0, 8);
         const abiCoder = new utils.AbiCoder();
    -    const abi = await abiCoder.encode(['address', 'address', 'address', 'uint256'], [senderAddress, recipientAddress, tokenAddress, value]);
    +    const abi = await abiCoder.encode(
    +      ['address', 'address', 'address', 'uint256'],
    +      [senderAddress, recipientAddress, tokenAddress, value]
    +    );
         const data = fromHex(methodSignature + strip0x(abi));
         const tx = new Tx(environment.bloxbergChainId);
         tx.nonce = await this.web3.eth.getTransactionCount(senderAddress);
    @@ -1182,7 +1214,7 @@ export class TransactionService {
         tx.value = toValue(value);
         tx.data = data;
         const txMsg = tx.message();
    -    const privateKey =  this.authService.mutableKeyStore.getPrivateKey();
    +    const privateKey = this.authService.mutableKeyStore.getPrivateKey();
         if (!privateKey.isDecrypted()) {
           const password = window.prompt('password');
           await privateKey.decrypt(password);
    diff --git a/docs/compodoc/injectables/UserService.html b/docs/compodoc/injectables/UserService.html
    index 37c5046..57d7f14 100644
    --- a/docs/compodoc/injectables/UserService.html
    +++ b/docs/compodoc/injectables/UserService.html
    @@ -209,7 +209,7 @@
                     
                             
                                 
    -                                
    +                                
                                 
                             
     
    @@ -322,8 +322,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -394,8 +394,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -586,8 +586,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -676,8 +676,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -764,8 +764,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -834,8 +834,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -904,8 +904,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -943,8 +943,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -1013,8 +1013,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -1052,8 +1052,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -1091,8 +1091,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -1161,8 +1161,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -1200,8 +1200,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -1282,8 +1282,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -1323,8 +1323,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -1412,8 +1412,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -1451,8 +1451,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -1521,8 +1521,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -1591,8 +1591,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -1663,8 +1663,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -1757,8 +1757,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -1876,7 +1876,9 @@
                         
                         
                             
    -                            Default value : new BehaviorSubject<Array<AccountDetails>>(this.accounts)
    +                            Default value : new BehaviorSubject<
    +    Array<AccountDetails>
    +  >(this.accounts)
                             
                         
                             
    @@ -1913,7 +1915,7 @@
                         
                             
                                 
    -                                    
    +                                    
                                 
                             
     
    @@ -1945,7 +1947,7 @@
                         
                             
                                 
    -                                    
    +                                    
                                 
                             
     
    @@ -1978,7 +1980,7 @@
                         
                             
                                 
    -                                    
    +                                    
                                 
                             
     
    @@ -2010,7 +2012,7 @@
                         
                             
                                 
    -                                    
    +                                    
                                 
                             
     
    @@ -2037,7 +2039,7 @@
                         
                         
                             
    -                            Default value : new HttpHeaders({'x-cic-automerge': 'client'})
    +                            Default value : new HttpHeaders({ 'x-cic-automerge': 'client' })
                             
                         
                             
    @@ -2136,35 +2138,37 @@
     
     
         
    -
    import {Injectable} from '@angular/core';
    -import {BehaviorSubject, Observable, Subject} from 'rxjs';
    -import {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';
    -import {environment} from '@src/environments/environment';
    -import {first} from 'rxjs/operators';
    -import {ArgPair, Envelope, Phone, Syncable, User} from 'cic-client-meta';
    -import {AccountDetails} from '@app/_models';
    -import {LoggingService} from '@app/_services/logging.service';
    -import {TokenService} from '@app/_services/token.service';
    -import {AccountIndex} from '@app/_eth';
    -import {MutableKeyStore, PGPSigner, Signer} from '@app/_pgp';
    -import {RegistryService} from '@app/_services/registry.service';
    -import {CICRegistry} from 'cic-client';
    -import {AuthService} from '@app/_services/auth.service';
    -import {personValidation, vcardValidation} from '@app/_helpers';
    -import {add0x} from '@src/assets/js/ethtx/dist/hex';
    +        
    import { Injectable } from '@angular/core';
    +import { BehaviorSubject, Observable, Subject } from 'rxjs';
    +import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
    +import { environment } from '@src/environments/environment';
    +import { first } from 'rxjs/operators';
    +import { ArgPair, Envelope, Phone, Syncable, User } from 'cic-client-meta';
    +import { AccountDetails } from '@app/_models';
    +import { LoggingService } from '@app/_services/logging.service';
    +import { TokenService } from '@app/_services/token.service';
    +import { AccountIndex } from '@app/_eth';
    +import { MutableKeyStore, PGPSigner, Signer } from '@app/_pgp';
    +import { RegistryService } from '@app/_services/registry.service';
    +import { CICRegistry } from 'cic-client';
    +import { AuthService } from '@app/_services/auth.service';
    +import { personValidation, vcardValidation } from '@app/_helpers';
    +import { add0x } from '@src/assets/js/ethtx/dist/hex';
     const vCard = require('vcard-parser');
     
     @Injectable({
    -  providedIn: 'root'
    +  providedIn: 'root',
     })
     export class UserService {
    -  headers: HttpHeaders = new HttpHeaders({'x-cic-automerge': 'client'});
    +  headers: HttpHeaders = new HttpHeaders({ 'x-cic-automerge': 'client' });
       keystore: MutableKeyStore;
       signer: Signer;
       registry: CICRegistry;
     
       accounts: Array<AccountDetails> = [];
    -  private accountsList: BehaviorSubject<Array<AccountDetails>> = new BehaviorSubject<Array<AccountDetails>>(this.accounts);
    +  private accountsList: BehaviorSubject<Array<AccountDetails>> = new BehaviorSubject<
    +    Array<AccountDetails>
    +  >(this.accounts);
       accountsSubject: Observable<Array<AccountDetails>> = this.accountsList.asObservable();
     
       actions: Array<any> = [];
    @@ -2176,7 +2180,7 @@ export class UserService {
         private loggingService: LoggingService,
         private tokenService: TokenService,
         private registryService: RegistryService,
    -    private authService: AuthService,
    +    private authService: AuthService
       ) {
         this.authService.init().then(() => {
           this.keystore = authService.mutableKeyStore;
    @@ -2188,28 +2192,38 @@ export class UserService {
     
       resetPin(phone: string): Observable<any> {
         const params: HttpParams = new HttpParams().set('phoneNumber', phone);
    -    return this.httpClient.get(`${environment.cicUssdUrl}/pin`, {params});
    +    return this.httpClient.get(`${environment.cicUssdUrl}/pin`, { params });
       }
     
       getAccountStatus(phone: string): Observable<any> {
         const params: HttpParams = new HttpParams().set('phoneNumber', phone);
    -    return this.httpClient.get(`${environment.cicUssdUrl}/pin`, {params});
    +    return this.httpClient.get(`${environment.cicUssdUrl}/pin`, { params });
       }
     
       getLockedAccounts(offset: number, limit: number): Observable<any> {
         return this.httpClient.get(`${environment.cicUssdUrl}/accounts/locked/${offset}/${limit}`);
       }
     
    -  async changeAccountInfo(address: string, name: string, phoneNumber: string, age: string, type: string, bio: string, gender: string,
    -                          businessCategory: string, userLocation: string, location: string, locationType: string
    +  async changeAccountInfo(
    +    address: string,
    +    name: string,
    +    phoneNumber: string,
    +    age: string,
    +    type: string,
    +    bio: string,
    +    gender: string,
    +    businessCategory: string,
    +    userLocation: string,
    +    location: string,
    +    locationType: string
       ): Promise<any> {
         const accountInfo: any = {
           vcard: {
             fn: [{}],
             n: [{}],
    -        tel: [{}]
    +        tel: [{}],
           },
    -      location: {}
    +      location: {},
         };
         accountInfo.vcard.fn[0].value = name;
         accountInfo.vcard.n[0].value = name.split(' ');
    @@ -2225,33 +2239,52 @@ export class UserService {
         await vcardValidation(accountInfo.vcard);
         accountInfo.vcard = btoa(vCard.generate(accountInfo.vcard));
         const accountKey: string = await User.toKey(address);
    -    this.getAccountDetailsFromMeta(accountKey).pipe(first()).subscribe(async res => {
    -      const syncableAccount: Syncable = Envelope.fromJSON(JSON.stringify(res)).unwrap();
    -      const update: Array<ArgPair> = [];
    -      for (const prop in accountInfo) {
    -        update.push(new ArgPair(prop, accountInfo[prop]));
    -      }
    -      syncableAccount.update(update, 'client-branch');
    -      await personValidation(syncableAccount.m.data);
    -      await this.updateMeta(syncableAccount, accountKey, this.headers);
    -    }, async error => {
    -      this.loggingService.sendErrorLevelMessage('Can\'t find account info in meta service', this, {error});
    -      const syncableAccount: Syncable = new Syncable(accountKey, accountInfo);
    -      await this.updateMeta(syncableAccount, accountKey, this.headers);
    -    });
    +    this.getAccountDetailsFromMeta(accountKey)
    +      .pipe(first())
    +      .subscribe(
    +        async (res) => {
    +          const syncableAccount: Syncable = Envelope.fromJSON(JSON.stringify(res)).unwrap();
    +          const update: Array<ArgPair> = [];
    +          for (const prop of Object.keys(accountInfo)) {
    +            update.push(new ArgPair(prop, accountInfo[prop]));
    +          }
    +          syncableAccount.update(update, 'client-branch');
    +          await personValidation(syncableAccount.m.data);
    +          await this.updateMeta(syncableAccount, accountKey, this.headers);
    +        },
    +        async (error) => {
    +          this.loggingService.sendErrorLevelMessage(
    +            'Cannot find account info in meta service',
    +            this,
    +            { error }
    +          );
    +          const syncableAccount: Syncable = new Syncable(accountKey, accountInfo);
    +          await this.updateMeta(syncableAccount, accountKey, this.headers);
    +        }
    +      );
         return accountKey;
       }
     
    -  async updateMeta(syncableAccount: Syncable, accountKey: string, headers: HttpHeaders): Promise<any> {
    -    const envelope: Envelope = await this.wrap(syncableAccount , this.signer);
    +  async updateMeta(
    +    syncableAccount: Syncable,
    +    accountKey: string,
    +    headers: HttpHeaders
    +  ): Promise<any> {
    +    const envelope: Envelope = await this.wrap(syncableAccount, this.signer);
         const reqBody: string = envelope.toJSON();
    -    this.httpClient.put(`${environment.cicMetaUrl}/${accountKey}`, reqBody , { headers }).pipe(first()).subscribe(res => {
    -      this.loggingService.sendInfoLevelMessage(`Response: ${res}`);
    -    });
    +    this.httpClient
    +      .put(`${environment.cicMetaUrl}/${accountKey}`, reqBody, { headers })
    +      .pipe(first())
    +      .subscribe((res) => {
    +        this.loggingService.sendInfoLevelMessage(`Response: ${res}`);
    +      });
       }
     
       getActions(): void {
    -    this.httpClient.get(`${environment.cicCacheUrl}/actions`).pipe(first()).subscribe(res => this.actionsList.next(res));
    +    this.httpClient
    +      .get(`${environment.cicCacheUrl}/actions`)
    +      .pipe(first())
    +      .subscribe((res) => this.actionsList.next(res));
       }
     
       getActionById(id: string): Observable<any> {
    @@ -2286,44 +2319,60 @@ export class UserService {
     
       async loadAccounts(limit: number = 100, offset: number = 0): Promise<void> {
         this.resetAccountsList();
    -    const accountIndexAddress: string = await this.registry.getContractAddressByName('AccountRegistry');
    +    const accountIndexAddress: string = await this.registry.getContractAddressByName(
    +      'AccountRegistry'
    +    );
         const accountIndexQuery = new AccountIndex(accountIndexAddress);
    -    const accountAddresses: Array<string> = await accountIndexQuery.last(await accountIndexQuery.totalAccounts());
    +    const accountAddresses: Array<string> = await accountIndexQuery.last(
    +      await accountIndexQuery.totalAccounts()
    +    );
         this.loggingService.sendInfoLevelMessage(accountAddresses);
         for (const accountAddress of accountAddresses.slice(offset, offset + limit)) {
           await this.getAccountByAddress(accountAddress, limit);
         }
       }
     
    -  async getAccountByAddress(accountAddress: string, limit: number = 100): Promise<Observable<AccountDetails>> {
    -    let accountSubject: Subject<any> = new Subject<any>();
    -    this.getAccountDetailsFromMeta(await User.toKey(add0x(accountAddress))).pipe(first()).subscribe(async res => {
    -      const account: Syncable = Envelope.fromJSON(JSON.stringify(res)).unwrap();
    -      const accountInfo = account.m.data;
    -      await personValidation(accountInfo);
    -      accountInfo.balance = await this.tokenService.getTokenBalance(accountInfo.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0]);
    -      accountInfo.vcard = vCard.parse(atob(accountInfo.vcard));
    -      await vcardValidation(accountInfo.vcard);
    -      this.accounts.unshift(accountInfo);
    -      if (this.accounts.length > limit) {
    -        this.accounts.length = limit;
    -      }
    -      this.accountsList.next(this.accounts);
    -      accountSubject.next(accountInfo);
    -    });
    +  async getAccountByAddress(
    +    accountAddress: string,
    +    limit: number = 100
    +  ): Promise<Observable<AccountDetails>> {
    +    const accountSubject: Subject<any> = new Subject<any>();
    +    this.getAccountDetailsFromMeta(await User.toKey(add0x(accountAddress)))
    +      .pipe(first())
    +      .subscribe(async (res) => {
    +        const account: Syncable = Envelope.fromJSON(JSON.stringify(res)).unwrap();
    +        const accountInfo = account.m.data;
    +        await personValidation(accountInfo);
    +        accountInfo.balance = await this.tokenService.getTokenBalance(
    +          accountInfo.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0]
    +        );
    +        accountInfo.vcard = vCard.parse(atob(accountInfo.vcard));
    +        await vcardValidation(accountInfo.vcard);
    +        this.accounts.unshift(accountInfo);
    +        if (this.accounts.length > limit) {
    +          this.accounts.length = limit;
    +        }
    +        this.accountsList.next(this.accounts);
    +        accountSubject.next(accountInfo);
    +      });
         return accountSubject.asObservable();
       }
     
    -  async getAccountByPhone(phoneNumber: string, limit: number = 100): Promise<Observable<AccountDetails>> {
    -    let accountSubject: Subject<any> = new Subject<any>();
    -    this.getAccountDetailsFromMeta(await Phone.toKey(phoneNumber)).pipe(first()).subscribe(async res => {
    -      const response: Syncable = Envelope.fromJSON(JSON.stringify(res)).unwrap();
    -      const address: string = response.m.data;
    -      const account: Observable<AccountDetails> = await this.getAccountByAddress(address, limit);
    -      account.subscribe(result => {
    -        accountSubject.next(result);
    +  async getAccountByPhone(
    +    phoneNumber: string,
    +    limit: number = 100
    +  ): Promise<Observable<AccountDetails>> {
    +    const accountSubject: Subject<any> = new Subject<any>();
    +    this.getAccountDetailsFromMeta(await Phone.toKey(phoneNumber))
    +      .pipe(first())
    +      .subscribe(async (res) => {
    +        const response: Syncable = Envelope.fromJSON(JSON.stringify(res)).unwrap();
    +        const address: string = response.m.data;
    +        const account: Observable<AccountDetails> = await this.getAccountByAddress(address, limit);
    +        account.subscribe((result) => {
    +          accountSubject.next(result);
    +        });
           });
    -    });
         return accountSubject.asObservable();
       }
     
    @@ -2332,7 +2381,9 @@ export class UserService {
         this.accountsList.next(this.accounts);
       }
     
    -  searchAccountByName(name: string): any { return; }
    +  searchAccountByName(name: string): any {
    +    return;
    +  }
     
       getCategories(): Observable<any> {
         return this.httpClient.get(`${environment.cicMetaUrl}/categories`);
    diff --git a/docs/compodoc/interceptors/ErrorInterceptor.html b/docs/compodoc/interceptors/ErrorInterceptor.html
    index fa58d89..16ffa31 100644
    --- a/docs/compodoc/interceptors/ErrorInterceptor.html
    +++ b/docs/compodoc/interceptors/ErrorInterceptor.html
    @@ -101,7 +101,7 @@
                     
                             
                                 
    -                                
    +                                
                                 
                             
     
    @@ -256,21 +256,21 @@
     
     
         
    -
    import {Injectable} from '@angular/core';
    +        
    import { Injectable } from '@angular/core';
     import {
       HttpRequest,
       HttpHandler,
       HttpEvent,
    -  HttpInterceptor, HttpErrorResponse
    +  HttpInterceptor,
    +  HttpErrorResponse,
     } from '@angular/common/http';
    -import {Observable, throwError} from 'rxjs';
    -import {catchError} from 'rxjs/operators';
    -import {ErrorDialogService, LoggingService} from '@app/_services';
    -import {Router} from '@angular/router';
    +import { Observable, throwError } from 'rxjs';
    +import { catchError } from 'rxjs/operators';
    +import { ErrorDialogService, LoggingService } from '@app/_services';
    +import { Router } from '@angular/router';
     
     @Injectable()
     export class ErrorInterceptor implements HttpInterceptor {
    -
       constructor(
         private errorDialogService: ErrorDialogService,
         private loggingService: LoggingService,
    @@ -287,11 +287,13 @@ export class ErrorInterceptor implements HttpInterceptor {
             } else {
               // The backend returned an unsuccessful response code.
               // The response body may contain clues as to what went wrong.
    -          errorMessage = `Backend returned code ${err.status}, body was: ${JSON.stringify(err.error)}`;
    +          errorMessage = `Backend returned code ${err.status}, body was: ${JSON.stringify(
    +            err.error
    +          )}`;
             }
    -        this.loggingService.sendErrorLevelMessage(errorMessage, this, {error: err});
    +        this.loggingService.sendErrorLevelMessage(errorMessage, this, { error: err });
             switch (err.status) {
    -          case 401:  // unauthorized
    +          case 401: // unauthorized
                 this.router.navigateByUrl('/auth').then();
                 break;
               case 403: // forbidden
    diff --git a/docs/compodoc/interceptors/HttpConfigInterceptor.html b/docs/compodoc/interceptors/HttpConfigInterceptor.html
    index f0edc0f..faa3a94 100644
    --- a/docs/compodoc/interceptors/HttpConfigInterceptor.html
    +++ b/docs/compodoc/interceptors/HttpConfigInterceptor.html
    @@ -101,7 +101,7 @@
                     
                             
                                 
    -                                
    +                                
                                 
                             
     
    @@ -136,8 +136,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -203,17 +203,11 @@
     
         
    import { Injectable } from '@angular/core';
    -import {
    -  HttpRequest,
    -  HttpHandler,
    -  HttpEvent,
    -  HttpInterceptor
    -} from '@angular/common/http';
    +import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
     import { Observable } from 'rxjs';
     
     @Injectable()
     export class HttpConfigInterceptor implements HttpInterceptor {
    -
       constructor() {}
     
       intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {
    diff --git a/docs/compodoc/interceptors/LoggingInterceptor.html b/docs/compodoc/interceptors/LoggingInterceptor.html
    index ceed77f..10e2117 100644
    --- a/docs/compodoc/interceptors/LoggingInterceptor.html
    +++ b/docs/compodoc/interceptors/LoggingInterceptor.html
    @@ -166,8 +166,8 @@
     
                 
                     
    -                    
    +                    
                     
                 
     
    @@ -238,18 +238,15 @@ import {
       HttpHandler,
       HttpEvent,
       HttpInterceptor,
    -  HttpResponse
    +  HttpResponse,
     } from '@angular/common/http';
    -import {Observable} from 'rxjs';
    -import {LoggingService} from '@app/_services/logging.service';
    -import {finalize, tap} from 'rxjs/operators';
    +import { Observable } from 'rxjs';
    +import { LoggingService } from '@app/_services/logging.service';
    +import { finalize, tap } from 'rxjs/operators';
     
     @Injectable()
     export class LoggingInterceptor implements HttpInterceptor {
    -
    -  constructor(
    -    private loggingService: LoggingService
    -  ) {}
    +  constructor(private loggingService: LoggingService) {}
     
       intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {
         return next.handle(request);
    diff --git a/docs/compodoc/interceptors/MockBackendInterceptor.html b/docs/compodoc/interceptors/MockBackendInterceptor.html
    index 88cbf35..348c1dd 100644
    --- a/docs/compodoc/interceptors/MockBackendInterceptor.html
    +++ b/docs/compodoc/interceptors/MockBackendInterceptor.html
    @@ -69,11 +69,6 @@ Provides a backend that can handle requests for certain data items.

    -

    -

    Example

    -

    -
    -

    Index

    @@ -131,8 +126,8 @@ Provides a backend that can handle requests for certain data items.

    - + @@ -213,15 +208,22 @@ Provides a backend that can handle requests for certain data items.

    -
    import {HTTP_INTERCEPTORS, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse} from '@angular/common/http';
    -import {Injectable} from '@angular/core';
    +        
    import {
    +  HTTP_INTERCEPTORS,
    +  HttpEvent,
    +  HttpHandler,
    +  HttpInterceptor,
    +  HttpRequest,
    +  HttpResponse,
    +} from '@angular/common/http';
    +import { Injectable } from '@angular/core';
     
     // Third party imports
    -import {Observable, of, throwError} from 'rxjs';
    -import {delay, dematerialize, materialize, mergeMap} from 'rxjs/operators';
    +import { Observable, of, throwError } from 'rxjs';
    +import { delay, dematerialize, materialize, mergeMap } from 'rxjs/operators';
     
     // Application imports
    -import {Action, AreaName, AreaType, Category, Token} from '@app/_models';
    +import { Action, AreaName, AreaType, Category, Token } from '@app/_models';
     
     /** A mock of the curated account types. */
     const accountTypes: Array<string> = ['user', 'cashier', 'vendor', 'tokenagent', 'group'];
    @@ -233,196 +235,969 @@ const actions: Array<Action> = [
       { id: 3, user: 'Will', role: 'superadmin', action: 'Reclaim RSV 1000', approval: true },
       { id: 4, user: 'Vivian', role: 'enroller', action: 'Complete user profile', approval: true },
       { id: 5, user: 'Jack', role: 'enroller', action: 'Reclaim RSV 200', approval: false },
    -  { id: 6, user: 'Patience', role: 'enroller', action: 'Change user information', approval: false }
    +  { id: 6, user: 'Patience', role: 'enroller', action: 'Change user information', approval: false },
     ];
     
     /** A mock of curated area names. */
     const areaNames: Array<AreaName> = [
       {
         name: 'Mukuru Nairobi',
    -    locations: ['kayaba', 'kayba', 'kambi', 'mukuru', 'masai', 'hazina', 'south', 'tetra', 'tetrapak', 'ruben', 'rueben', 'kingston',
    -      'korokocho', 'kingstone', 'kamongo', 'lungalunga', 'sinai', 'sigei', 'lungu', 'lunga lunga', 'owino road', 'seigei']
    +    locations: [
    +      'kayaba',
    +      'kayba',
    +      'kambi',
    +      'mukuru',
    +      'masai',
    +      'hazina',
    +      'south',
    +      'tetra',
    +      'tetrapak',
    +      'ruben',
    +      'rueben',
    +      'kingston',
    +      'korokocho',
    +      'kingstone',
    +      'kamongo',
    +      'lungalunga',
    +      'sinai',
    +      'sigei',
    +      'lungu',
    +      'lunga lunga',
    +      'owino road',
    +      'seigei',
    +    ],
       },
       {
         name: 'Kinango Kwale',
    -    locations: ['amani', 'bofu', 'chibuga', 'chikomani', 'chilongoni', 'chigojoni', 'chinguluni', 'chigato', 'chigale', 'chikole',
    -      'chilongoni', 'chilumani', 'chigojoni', 'chikomani', 'chizini', 'chikomeni', 'chidzuvini', 'chidzivuni', 'chikuyu', 'chizingo',
    -      'doti', 'dzugwe', 'dzivani', 'dzovuni', 'hanje', 'kasemeni', 'katundani', 'kibandaogo', 'kibandaongo', 'kwale', 'kinango',
    -      'kidzuvini', 'kalalani', 'kafuduni', 'kaloleni', 'kilibole', 'lutsangani', 'peku', 'gona', 'guro', 'gandini', 'mkanyeni', 'myenzeni',
    -      'miyenzeni', 'miatsiani', 'mienzeni', 'mnyenzeni', 'minyenzeni', 'miyani', 'mioleni', 'makuluni', 'mariakani', 'makobeni', 'madewani',
    -      'mwangaraba', 'mwashanga', 'miloeni', 'mabesheni', 'mazeras', 'mazera', 'mlola', 'muugano', 'mulunguni', 'mabesheni', 'miatsani',
    -      'miatsiani', 'mwache', 'mwangani', 'mwehavikonje', 'miguneni', 'nzora', 'nzovuni', 'vikinduni', 'vikolani', 'vitangani', 'viogato',
    -      'vyogato', 'vistangani', 'yapha', 'yava', 'yowani', 'ziwani', 'majengo', 'matuga', 'vigungani', 'vidziweni', 'vinyunduni', 'ukunda',
    -      'kokotoni', 'mikindani']
    +    locations: [
    +      'amani',
    +      'bofu',
    +      'chibuga',
    +      'chikomani',
    +      'chilongoni',
    +      'chigojoni',
    +      'chinguluni',
    +      'chigato',
    +      'chigale',
    +      'chikole',
    +      'chilongoni',
    +      'chilumani',
    +      'chigojoni',
    +      'chikomani',
    +      'chizini',
    +      'chikomeni',
    +      'chidzuvini',
    +      'chidzivuni',
    +      'chikuyu',
    +      'chizingo',
    +      'doti',
    +      'dzugwe',
    +      'dzivani',
    +      'dzovuni',
    +      'hanje',
    +      'kasemeni',
    +      'katundani',
    +      'kibandaogo',
    +      'kibandaongo',
    +      'kwale',
    +      'kinango',
    +      'kidzuvini',
    +      'kalalani',
    +      'kafuduni',
    +      'kaloleni',
    +      'kilibole',
    +      'lutsangani',
    +      'peku',
    +      'gona',
    +      'guro',
    +      'gandini',
    +      'mkanyeni',
    +      'myenzeni',
    +      'miyenzeni',
    +      'miatsiani',
    +      'mienzeni',
    +      'mnyenzeni',
    +      'minyenzeni',
    +      'miyani',
    +      'mioleni',
    +      'makuluni',
    +      'mariakani',
    +      'makobeni',
    +      'madewani',
    +      'mwangaraba',
    +      'mwashanga',
    +      'miloeni',
    +      'mabesheni',
    +      'mazeras',
    +      'mazera',
    +      'mlola',
    +      'muugano',
    +      'mulunguni',
    +      'mabesheni',
    +      'miatsani',
    +      'miatsiani',
    +      'mwache',
    +      'mwangani',
    +      'mwehavikonje',
    +      'miguneni',
    +      'nzora',
    +      'nzovuni',
    +      'vikinduni',
    +      'vikolani',
    +      'vitangani',
    +      'viogato',
    +      'vyogato',
    +      'vistangani',
    +      'yapha',
    +      'yava',
    +      'yowani',
    +      'ziwani',
    +      'majengo',
    +      'matuga',
    +      'vigungani',
    +      'vidziweni',
    +      'vinyunduni',
    +      'ukunda',
    +      'kokotoni',
    +      'mikindani',
    +    ],
       },
       {
         name: 'Misc Nairobi',
    -    locations: ['nairobi', 'west', 'lindi', 'kibera', 'kibira', 'kibra', 'makina', 'soweto', 'olympic', 'kangemi', 'ruiru', 'congo',
    -      'kawangware', 'kwangware', 'donholm', 'dagoreti', 'dandora', 'kabete', 'sinai', 'donhom', 'donholm', 'huruma', 'kitengela',
    -      'makadara', ',mlolongo', 'kenyatta', 'mlolongo', 'tassia', 'tasia', 'gatina', '56', 'industrial', 'kariobangi', 'kasarani', 'kayole',
    -      'mathare', 'pipe', 'juja', 'uchumi', 'jogoo', 'umoja', 'thika', 'kikuyu', 'stadium', 'buru buru', 'ngong', 'starehe', 'mwiki',
    -      'fuata', 'kware', 'kabiro', 'embakassi', 'embakasi', 'kmoja', 'east', 'githurai', 'landi', 'langata', 'limuru', 'mathere',
    -      'dagoretti', 'kirembe', 'muugano', 'mwiki', 'toi market']
    +    locations: [
    +      'nairobi',
    +      'west',
    +      'lindi',
    +      'kibera',
    +      'kibira',
    +      'kibra',
    +      'makina',
    +      'soweto',
    +      'olympic',
    +      'kangemi',
    +      'ruiru',
    +      'congo',
    +      'kawangware',
    +      'kwangware',
    +      'donholm',
    +      'dagoreti',
    +      'dandora',
    +      'kabete',
    +      'sinai',
    +      'donhom',
    +      'donholm',
    +      'huruma',
    +      'kitengela',
    +      'makadara',
    +      ',mlolongo',
    +      'kenyatta',
    +      'mlolongo',
    +      'tassia',
    +      'tasia',
    +      'gatina',
    +      '56',
    +      'industrial',
    +      'kariobangi',
    +      'kasarani',
    +      'kayole',
    +      'mathare',
    +      'pipe',
    +      'juja',
    +      'uchumi',
    +      'jogoo',
    +      'umoja',
    +      'thika',
    +      'kikuyu',
    +      'stadium',
    +      'buru buru',
    +      'ngong',
    +      'starehe',
    +      'mwiki',
    +      'fuata',
    +      'kware',
    +      'kabiro',
    +      'embakassi',
    +      'embakasi',
    +      'kmoja',
    +      'east',
    +      'githurai',
    +      'landi',
    +      'langata',
    +      'limuru',
    +      'mathere',
    +      'dagoretti',
    +      'kirembe',
    +      'muugano',
    +      'mwiki',
    +      'toi market',
    +    ],
       },
       {
         name: 'Misc Mombasa',
    -    locations: ['mombasa', 'likoni', 'bangla', 'bangladesh', 'kizingo', 'old town', 'makupa', 'mvita', 'ngombeni', 'ngómbeni', 'ombeni',
    -      'magongo', 'miritini', 'changamwe', 'jomvu', 'ohuru', 'tudor', 'diani']
    +    locations: [
    +      'mombasa',
    +      'likoni',
    +      'bangla',
    +      'bangladesh',
    +      'kizingo',
    +      'old town',
    +      'makupa',
    +      'mvita',
    +      'ngombeni',
    +      'ngómbeni',
    +      'ombeni',
    +      'magongo',
    +      'miritini',
    +      'changamwe',
    +      'jomvu',
    +      'ohuru',
    +      'tudor',
    +      'diani',
    +    ],
       },
       {
         name: 'Kisauni',
    -    locations: ['bamburi', 'kisauni', 'mworoni', 'nyali', 'shanzu', 'bombolulu', 'mtopanga', 'mjambere', 'majaoni', 'manyani', 'magogoni',
    -      'junda', 'mwakirunge', 'mshomoroni']
    +    locations: [
    +      'bamburi',
    +      'kisauni',
    +      'mworoni',
    +      'nyali',
    +      'shanzu',
    +      'bombolulu',
    +      'mtopanga',
    +      'mjambere',
    +      'majaoni',
    +      'manyani',
    +      'magogoni',
    +      'junda',
    +      'mwakirunge',
    +      'mshomoroni',
    +    ],
       },
       {
         name: 'Kilifi',
    -    locations: ['kilfi', 'kilifi', 'mtwapa', 'takaungu', 'makongeni', 'mnarani', 'mnarani', 'office', 'g.e', 'ge', 'raibai', 'ribe']
    +    locations: [
    +      'kilfi',
    +      'kilifi',
    +      'mtwapa',
    +      'takaungu',
    +      'makongeni',
    +      'mnarani',
    +      'mnarani',
    +      'office',
    +      'g.e',
    +      'ge',
    +      'raibai',
    +      'ribe',
    +    ],
       },
       {
         name: 'Kakuma',
    -    locations: ['kakuma']
    +    locations: ['kakuma'],
       },
       {
         name: 'Kitui',
    -    locations: ['kitui', 'mwingi']
    +    locations: ['kitui', 'mwingi'],
       },
       {
         name: 'Nyanza',
    -    locations: ['busia', 'nyalgunga', 'mbita', 'siaya', 'kisumu', 'nyalenda', 'hawinga', 'rangala', 'uyoma', 'mumias', 'homabay', 'homaboy',
    -      'migori', 'kusumu']
    +    locations: [
    +      'busia',
    +      'nyalgunga',
    +      'mbita',
    +      'siaya',
    +      'kisumu',
    +      'nyalenda',
    +      'hawinga',
    +      'rangala',
    +      'uyoma',
    +      'mumias',
    +      'homabay',
    +      'homaboy',
    +      'migori',
    +      'kusumu',
    +    ],
       },
       {
         name: 'Misc Rural Counties',
    -    locations: ['makueni', 'meru', 'kisii', 'bomet', 'machakos', 'bungoma', 'eldoret', 'kakamega', 'kericho', 'kajiado', 'nandi', 'nyeri',
    -      'wote', 'kiambu', 'mwea', 'nakuru', 'narok']
    +    locations: [
    +      'makueni',
    +      'meru',
    +      'kisii',
    +      'bomet',
    +      'machakos',
    +      'bungoma',
    +      'eldoret',
    +      'kakamega',
    +      'kericho',
    +      'kajiado',
    +      'nandi',
    +      'nyeri',
    +      'wote',
    +      'kiambu',
    +      'mwea',
    +      'nakuru',
    +      'narok',
    +    ],
       },
       {
         name: 'other',
    -    locations: ['other', 'none', 'unknown']
    -  }
    +    locations: ['other', 'none', 'unknown'],
    +  },
     ];
     
     /** A mock of curated area types. */
     const areaTypes: Array<AreaType> = [
       {
         name: 'urban',
    -    area: ['urban', 'nairobi', 'mombasa']
    +    area: ['urban', 'nairobi', 'mombasa'],
       },
       {
         name: 'rural',
    -    area: ['rural', 'kakuma', 'kwale', 'kinango', 'kitui', 'nyanza']
    +    area: ['rural', 'kakuma', 'kwale', 'kinango', 'kitui', 'nyanza'],
       },
       {
         name: 'periurban',
    -    area: ['kilifi', 'periurban']
    +    area: ['kilifi', 'periurban'],
       },
       {
         name: 'other',
    -    area: ['other']
    -  }
    +    area: ['other'],
    +  },
     ];
     
     /** A mock of the user's business categories */
     const categories: Array<Category> = [
       {
         name: 'system',
    -    products: ['system', 'office main', 'office main phone']
    +    products: ['system', 'office main', 'office main phone'],
       },
       {
         name: 'education',
    -    products: ['book', 'coach', 'teacher', 'sch', 'school', 'pry', 'education', 'student', 'mwalimu', 'maalim', 'consultant', 'consult',
    -      'college', 'university', 'lecturer', 'primary', 'secondary', 'daycare', 'babycare', 'baby care', 'elim', 'eimu', 'nursery',
    -      'red cross', 'volunteer', 'instructor', 'journalist', 'lesson', 'academy', 'headmistress', 'headteacher', 'cyber', 'researcher',
    -      'professor', 'demo', 'expert', 'tution', 'tuition', 'children', 'headmaster', 'educator', 'Marital counsellor', 'counsellor',
    -      'trainer', 'vijana', 'youth', 'intern', 'redcross', 'KRCS', 'danish', 'science', 'data', 'facilitator', 'vitabu', 'kitabu']
    +    products: [
    +      'book',
    +      'coach',
    +      'teacher',
    +      'sch',
    +      'school',
    +      'pry',
    +      'education',
    +      'student',
    +      'mwalimu',
    +      'maalim',
    +      'consultant',
    +      'consult',
    +      'college',
    +      'university',
    +      'lecturer',
    +      'primary',
    +      'secondary',
    +      'daycare',
    +      'babycare',
    +      'baby care',
    +      'elim',
    +      'eimu',
    +      'nursery',
    +      'red cross',
    +      'volunteer',
    +      'instructor',
    +      'journalist',
    +      'lesson',
    +      'academy',
    +      'headmistress',
    +      'headteacher',
    +      'cyber',
    +      'researcher',
    +      'professor',
    +      'demo',
    +      'expert',
    +      'tution',
    +      'tuition',
    +      'children',
    +      'headmaster',
    +      'educator',
    +      'Marital counsellor',
    +      'counsellor',
    +      'trainer',
    +      'vijana',
    +      'youth',
    +      'intern',
    +      'redcross',
    +      'KRCS',
    +      'danish',
    +      'science',
    +      'data',
    +      'facilitator',
    +      'vitabu',
    +      'kitabu',
    +    ],
       },
       {
         name: 'faith',
    -    products: ['pastor', 'imam', 'madrasa', 'religous', 'religious', 'ustadh', 'ustadhi', 'Marital counsellor', 'counsellor', 'church',
    -      'kanisa', 'mksiti', 'donor']
    +    products: [
    +      'pastor',
    +      'imam',
    +      'madrasa',
    +      'religous',
    +      'religious',
    +      'ustadh',
    +      'ustadhi',
    +      'Marital counsellor',
    +      'counsellor',
    +      'church',
    +      'kanisa',
    +      'mksiti',
    +      'donor',
    +    ],
       },
       {
         name: 'government',
    -    products: ['elder', 'chief', 'police', 'government', 'country', 'county', 'soldier', 'village admin', 'ward', 'leader', 'kra',
    -      'mailman', 'immagration', 'immigration']
    +    products: [
    +      'elder',
    +      'chief',
    +      'police',
    +      'government',
    +      'country',
    +      'county',
    +      'soldier',
    +      'village admin',
    +      'ward',
    +      'leader',
    +      'kra',
    +      'mailman',
    +      'immagration',
    +      'immigration',
    +    ],
       },
       {
         name: 'environment',
    -    products: ['conservation', 'toilet', 'choo', 'garbage', 'fagio', 'waste', 'tree', 'taka', 'scrap', 'cleaning', 'gardener', 'rubbish',
    -      'usafi', 'mazingira', 'miti', 'trash', 'cleaner', 'plastic', 'collection', 'seedling', 'seedlings', 'recycling']
    +    products: [
    +      'conservation',
    +      'toilet',
    +      'choo',
    +      'garbage',
    +      'fagio',
    +      'waste',
    +      'tree',
    +      'taka',
    +      'scrap',
    +      'cleaning',
    +      'gardener',
    +      'rubbish',
    +      'usafi',
    +      'mazingira',
    +      'miti',
    +      'trash',
    +      'cleaner',
    +      'plastic',
    +      'collection',
    +      'seedling',
    +      'seedlings',
    +      'recycling',
    +    ],
       },
       {
         name: 'farming',
    -    products: ['farm', 'farmer', 'farming', 'mkulima', 'kulima', 'ukulima', 'wakulima', 'jembe', 'shamba']
    +    products: [
    +      'farm',
    +      'farmer',
    +      'farming',
    +      'mkulima',
    +      'kulima',
    +      'ukulima',
    +      'wakulima',
    +      'jembe',
    +      'shamba',
    +    ],
       },
       {
         name: 'labour',
    -    products: ['artist', 'agent', 'guard', 'askari', 'accountant', 'baker', 'beadwork', 'beauty', 'business', 'barber', 'casual',
    -      'electrian', 'caretaker', 'car wash', 'capenter', 'construction', 'chef', 'catering', 'cobler', 'cobbler', 'carwash', 'dhobi',
    -      'landlord', 'design', 'carpenter', 'fundi', 'hawking', 'hawker', 'househelp', 'hsehelp', 'house help', 'help', 'housegirl', 'kushona',
    -      'juakali', 'jualikali', 'juacali', 'jua kali', 'shepherd', 'makuti', 'kujenga', 'kinyozi', 'kazi', 'knitting', 'kufua', 'fua',
    -      'hustler', 'biashara', 'labour', 'labor', 'laundry', 'repair', 'hair', 'posho', 'mill', 'mtambo', 'uvuvi', 'engineer', 'manager',
    -      'tailor', 'nguo', 'mason', 'mtumba', 'garage', 'mechanic', 'mjenzi', 'mfugaji', 'painter', 'receptionist', 'printing', 'programming',
    -      'plumb', 'charging', 'salon', 'mpishi', 'msusi', 'mgema', 'footballer', 'photocopy', 'peddler', 'staff', 'sales', 'service', 'saloon',
    -      'seremala', 'security', 'insurance', 'secretary', 'shoe', 'shepard', 'shephard', 'tout', 'tv', 'mvuvi', 'mawe', 'majani', 'maembe',
    -      'freelance', 'mjengo', 'electronics', 'photographer', 'programmer', 'electrician', 'washing', 'bricks', 'welder', 'welding',
    -      'working', 'worker', 'watchman', 'waiter', 'waitress', 'viatu', 'yoga', 'guitarist', 'house', 'artisan', 'musician', 'trade',
    -      'makonge', 'ujenzi', 'vendor', 'watchlady', 'marketing', 'beautician', 'photo', 'metal work', 'supplier', 'law firm', 'brewer']
    +    products: [
    +      'artist',
    +      'agent',
    +      'guard',
    +      'askari',
    +      'accountant',
    +      'baker',
    +      'beadwork',
    +      'beauty',
    +      'business',
    +      'barber',
    +      'casual',
    +      'electrian',
    +      'caretaker',
    +      'car wash',
    +      'capenter',
    +      'construction',
    +      'chef',
    +      'catering',
    +      'cobler',
    +      'cobbler',
    +      'carwash',
    +      'dhobi',
    +      'landlord',
    +      'design',
    +      'carpenter',
    +      'fundi',
    +      'hawking',
    +      'hawker',
    +      'househelp',
    +      'hsehelp',
    +      'house help',
    +      'help',
    +      'housegirl',
    +      'kushona',
    +      'juakali',
    +      'jualikali',
    +      'juacali',
    +      'jua kali',
    +      'shepherd',
    +      'makuti',
    +      'kujenga',
    +      'kinyozi',
    +      'kazi',
    +      'knitting',
    +      'kufua',
    +      'fua',
    +      'hustler',
    +      'biashara',
    +      'labour',
    +      'labor',
    +      'laundry',
    +      'repair',
    +      'hair',
    +      'posho',
    +      'mill',
    +      'mtambo',
    +      'uvuvi',
    +      'engineer',
    +      'manager',
    +      'tailor',
    +      'nguo',
    +      'mason',
    +      'mtumba',
    +      'garage',
    +      'mechanic',
    +      'mjenzi',
    +      'mfugaji',
    +      'painter',
    +      'receptionist',
    +      'printing',
    +      'programming',
    +      'plumb',
    +      'charging',
    +      'salon',
    +      'mpishi',
    +      'msusi',
    +      'mgema',
    +      'footballer',
    +      'photocopy',
    +      'peddler',
    +      'staff',
    +      'sales',
    +      'service',
    +      'saloon',
    +      'seremala',
    +      'security',
    +      'insurance',
    +      'secretary',
    +      'shoe',
    +      'shepard',
    +      'shephard',
    +      'tout',
    +      'tv',
    +      'mvuvi',
    +      'mawe',
    +      'majani',
    +      'maembe',
    +      'freelance',
    +      'mjengo',
    +      'electronics',
    +      'photographer',
    +      'programmer',
    +      'electrician',
    +      'washing',
    +      'bricks',
    +      'welder',
    +      'welding',
    +      'working',
    +      'worker',
    +      'watchman',
    +      'waiter',
    +      'waitress',
    +      'viatu',
    +      'yoga',
    +      'guitarist',
    +      'house',
    +      'artisan',
    +      'musician',
    +      'trade',
    +      'makonge',
    +      'ujenzi',
    +      'vendor',
    +      'watchlady',
    +      'marketing',
    +      'beautician',
    +      'photo',
    +      'metal work',
    +      'supplier',
    +      'law firm',
    +      'brewer',
    +    ],
       },
       {
         name: 'food',
    -    products: ['avocado', 'bhajia', 'bajia', 'mbonga', 'bofu', 'beans', 'biscuits', 'biringanya', 'banana', 'bananas', 'crisps', 'chakula',
    -      'coconut', 'chapati', 'cereal', 'chipo', 'chapo', 'chai', 'chips', 'cassava', 'cake', 'cereals', 'cook', 'corn', 'coffee', 'chicken',
    -      'dagaa', 'donut', 'dough', 'groundnuts', 'hotel', 'holel', 'hoteli', 'butcher', 'butchery', 'fruit', 'food', 'fruits', 'fish',
    -      'githeri', 'grocery', 'grocer', 'pojo', 'papa', 'goats', 'mabenda', 'mbenda', 'poultry', 'soda', 'peanuts', 'potatoes', 'samosa',
    -      'soko', 'samaki', 'tomato', 'tomatoes', 'mchele', 'matunda', 'mango', 'melon', 'mellon', 'nyanya', 'nyama', 'omena', 'umena', 'ndizi',
    -      'njugu', 'kamba kamba', 'khaimati', 'kaimati', 'kunde', 'kuku', 'kahawa', 'keki', 'muguka', 'miraa', 'milk', 'choma', 'maziwa',
    -      'mboga', 'mbog', 'busaa', 'chumvi', 'cabbages', 'mabuyu', 'machungwa', 'mbuzi', 'mnazi', 'mchicha', 'ngombe', 'ngano', 'nazi',
    -      'oranges', 'peanuts', 'mkate', 'bread', 'mikate', 'vitungu', 'sausages', 'maize', 'mbata', 'mchuzi', 'mchuuzi', 'mandazi', 'mbaazi',
    -      'mahindi', 'maandazi', 'mogoka', 'meat', 'mhogo', 'mihogo', 'muhogo', 'maharagwe', 'miwa', 'mahamri', 'mitumba', 'simsim', 'porridge',
    -      'pilau', 'vegetable', 'egg', 'mayai', 'mifugo', 'unga', 'good', 'sima', 'sweet', 'sweats', 'sambusa', 'snacks', 'sugar', 'suger',
    -      'ugoro', 'sukari', 'soup', 'spinach', 'smokie', 'smokies', 'sukuma', 'tea', 'uji', 'ugali', 'uchuzi', 'uchuuzi', 'viazi', 'yoghurt',
    -      'yogurt', 'wine', 'marondo', 'maandzi', 'matoke', 'omeno', 'onions', 'nzugu', 'korosho', 'barafu', 'juice']
    +    products: [
    +      'avocado',
    +      'bhajia',
    +      'bajia',
    +      'mbonga',
    +      'bofu',
    +      'beans',
    +      'biscuits',
    +      'biringanya',
    +      'banana',
    +      'bananas',
    +      'crisps',
    +      'chakula',
    +      'coconut',
    +      'chapati',
    +      'cereal',
    +      'chipo',
    +      'chapo',
    +      'chai',
    +      'chips',
    +      'cassava',
    +      'cake',
    +      'cereals',
    +      'cook',
    +      'corn',
    +      'coffee',
    +      'chicken',
    +      'dagaa',
    +      'donut',
    +      'dough',
    +      'groundnuts',
    +      'hotel',
    +      'holel',
    +      'hoteli',
    +      'butcher',
    +      'butchery',
    +      'fruit',
    +      'food',
    +      'fruits',
    +      'fish',
    +      'githeri',
    +      'grocery',
    +      'grocer',
    +      'pojo',
    +      'papa',
    +      'goats',
    +      'mabenda',
    +      'mbenda',
    +      'poultry',
    +      'soda',
    +      'peanuts',
    +      'potatoes',
    +      'samosa',
    +      'soko',
    +      'samaki',
    +      'tomato',
    +      'tomatoes',
    +      'mchele',
    +      'matunda',
    +      'mango',
    +      'melon',
    +      'mellon',
    +      'nyanya',
    +      'nyama',
    +      'omena',
    +      'umena',
    +      'ndizi',
    +      'njugu',
    +      'kamba kamba',
    +      'khaimati',
    +      'kaimati',
    +      'kunde',
    +      'kuku',
    +      'kahawa',
    +      'keki',
    +      'muguka',
    +      'miraa',
    +      'milk',
    +      'choma',
    +      'maziwa',
    +      'mboga',
    +      'mbog',
    +      'busaa',
    +      'chumvi',
    +      'cabbages',
    +      'mabuyu',
    +      'machungwa',
    +      'mbuzi',
    +      'mnazi',
    +      'mchicha',
    +      'ngombe',
    +      'ngano',
    +      'nazi',
    +      'oranges',
    +      'peanuts',
    +      'mkate',
    +      'bread',
    +      'mikate',
    +      'vitungu',
    +      'sausages',
    +      'maize',
    +      'mbata',
    +      'mchuzi',
    +      'mchuuzi',
    +      'mandazi',
    +      'mbaazi',
    +      'mahindi',
    +      'maandazi',
    +      'mogoka',
    +      'meat',
    +      'mhogo',
    +      'mihogo',
    +      'muhogo',
    +      'maharagwe',
    +      'miwa',
    +      'mahamri',
    +      'mitumba',
    +      'simsim',
    +      'porridge',
    +      'pilau',
    +      'vegetable',
    +      'egg',
    +      'mayai',
    +      'mifugo',
    +      'unga',
    +      'good',
    +      'sima',
    +      'sweet',
    +      'sweats',
    +      'sambusa',
    +      'snacks',
    +      'sugar',
    +      'suger',
    +      'ugoro',
    +      'sukari',
    +      'soup',
    +      'spinach',
    +      'smokie',
    +      'smokies',
    +      'sukuma',
    +      'tea',
    +      'uji',
    +      'ugali',
    +      'uchuzi',
    +      'uchuuzi',
    +      'viazi',
    +      'yoghurt',
    +      'yogurt',
    +      'wine',
    +      'marondo',
    +      'maandzi',
    +      'matoke',
    +      'omeno',
    +      'onions',
    +      'nzugu',
    +      'korosho',
    +      'barafu',
    +      'juice',
    +    ],
       },
       {
         name: 'water',
    -    products: ['maji', 'water']
    +    products: ['maji', 'water'],
       },
       {
         name: 'health',
    -    products: ['agrovet', 'dispensary', 'barakoa', 'chemist', 'Chemicals', 'chv', 'doctor', 'daktari', 'dawa', 'hospital', 'herbalist',
    -      'mganga', 'sabuni', 'soap', 'nurse', 'heath', 'community health worker', 'clinic', 'clinical', 'mask', 'medicine', 'lab technician',
    -      'pharmacy', 'cosmetics', 'veterinary', 'vet', 'sickly', 'emergency response', 'emergency']
    +    products: [
    +      'agrovet',
    +      'dispensary',
    +      'barakoa',
    +      'chemist',
    +      'Chemicals',
    +      'chv',
    +      'doctor',
    +      'daktari',
    +      'dawa',
    +      'hospital',
    +      'herbalist',
    +      'mganga',
    +      'sabuni',
    +      'soap',
    +      'nurse',
    +      'heath',
    +      'community health worker',
    +      'clinic',
    +      'clinical',
    +      'mask',
    +      'medicine',
    +      'lab technician',
    +      'pharmacy',
    +      'cosmetics',
    +      'veterinary',
    +      'vet',
    +      'sickly',
    +      'emergency response',
    +      'emergency',
    +    ],
       },
       {
         name: 'savings',
    -    products: ['chama', 'group', 'savings', 'loan', 'silc', 'vsla', 'credit', 'finance']
    +    products: ['chama', 'group', 'savings', 'loan', 'silc', 'vsla', 'credit', 'finance'],
       },
       {
         name: 'shop',
    -    products: ['bag', 'bead', 'belt', 'bedding', 'jik', 'bed', 'cement', 'botique', 'boutique', 'lines', 'kibanda', 'kiosk', 'spareparts',
    -      'candy', 'cloth', 'electricals', 'mutumba', 'cafe', 'leso', 'lesso', 'duka', 'spare parts', 'socks', 'malimali', 'mitungi',
    -      'mali mali', 'hardware', 'detergent', 'detergents', 'dera', 'retail', 'kamba', 'pombe', 'pampers', 'pool', 'phone', 'simu', 'mangwe',
    -      'mikeka', 'movie', 'shop', 'acces', 'mchanga', 'uto', 'airtime', 'matress', 'mattress', 'mattresses', 'mpsea', 'mpesa', 'shirt',
    -      'wholesaler', 'perfume', 'playstation', 'tissue', 'vikapu', 'uniform', 'flowers', 'vitenge', 'utencils', 'utensils', 'station',
    -      'jewel', 'pool table', 'club', 'pub', 'bar', 'furniture', 'm-pesa', 'vyombo']
    +    products: [
    +      'bag',
    +      'bead',
    +      'belt',
    +      'bedding',
    +      'jik',
    +      'bed',
    +      'cement',
    +      'botique',
    +      'boutique',
    +      'lines',
    +      'kibanda',
    +      'kiosk',
    +      'spareparts',
    +      'candy',
    +      'cloth',
    +      'electricals',
    +      'mutumba',
    +      'cafe',
    +      'leso',
    +      'lesso',
    +      'duka',
    +      'spare parts',
    +      'socks',
    +      'malimali',
    +      'mitungi',
    +      'mali mali',
    +      'hardware',
    +      'detergent',
    +      'detergents',
    +      'dera',
    +      'retail',
    +      'kamba',
    +      'pombe',
    +      'pampers',
    +      'pool',
    +      'phone',
    +      'simu',
    +      'mangwe',
    +      'mikeka',
    +      'movie',
    +      'shop',
    +      'acces',
    +      'mchanga',
    +      'uto',
    +      'airtime',
    +      'matress',
    +      'mattress',
    +      'mattresses',
    +      'mpsea',
    +      'mpesa',
    +      'shirt',
    +      'wholesaler',
    +      'perfume',
    +      'playstation',
    +      'tissue',
    +      'vikapu',
    +      'uniform',
    +      'flowers',
    +      'vitenge',
    +      'utencils',
    +      'utensils',
    +      'station',
    +      'jewel',
    +      'pool table',
    +      'club',
    +      'pub',
    +      'bar',
    +      'furniture',
    +      'm-pesa',
    +      'vyombo',
    +    ],
       },
       {
         name: 'transport',
    -    products: ['kebeba', 'beba', 'bebabeba', 'bike', 'bicycle', 'matatu', 'boda', 'bodaboda', 'cart', 'carrier', 'tour', 'travel', 'driver',
    -      'dereva', 'tout', 'conductor', 'kubeba', 'tuktuk', 'taxi', 'piki', 'pikipiki', 'manamba', 'trasportion', 'mkokoteni', 'mover',
    -      'motorist', 'motorbike', 'transport', 'transpoter', 'gari', 'magari', 'makanga', 'car']
    +    products: [
    +      'kebeba',
    +      'beba',
    +      'bebabeba',
    +      'bike',
    +      'bicycle',
    +      'matatu',
    +      'boda',
    +      'bodaboda',
    +      'cart',
    +      'carrier',
    +      'tour',
    +      'travel',
    +      'driver',
    +      'dereva',
    +      'tout',
    +      'conductor',
    +      'kubeba',
    +      'tuktuk',
    +      'taxi',
    +      'piki',
    +      'pikipiki',
    +      'manamba',
    +      'trasportion',
    +      'mkokoteni',
    +      'mover',
    +      'motorist',
    +      'motorbike',
    +      'transport',
    +      'transpoter',
    +      'gari',
    +      'magari',
    +      'makanga',
    +      'car',
    +    ],
       },
       {
         name: 'fuel/energy',
    -    products: ['timber', 'timberyard', 'biogas', 'charcol', 'charcoal', 'kuni', 'mbao', 'fuel', 'makaa', 'mafuta', 'moto', 'solar', 'stima',
    -      'fire', 'firewood', 'wood', 'oil', 'taa', 'gas', 'paraffin', 'parrafin', 'parafin', 'petrol', 'petro', 'kerosine', 'kerosene',
    -      'diesel']
    +    products: [
    +      'timber',
    +      'timberyard',
    +      'biogas',
    +      'charcol',
    +      'charcoal',
    +      'kuni',
    +      'mbao',
    +      'fuel',
    +      'makaa',
    +      'mafuta',
    +      'moto',
    +      'solar',
    +      'stima',
    +      'fire',
    +      'firewood',
    +      'wood',
    +      'oil',
    +      'taa',
    +      'gas',
    +      'paraffin',
    +      'parrafin',
    +      'parafin',
    +      'petrol',
    +      'petro',
    +      'kerosine',
    +      'kerosene',
    +      'diesel',
    +    ],
       },
       {
         name: 'other',
    -    products: ['other', 'none', 'unknown', 'none']
    -  }
    +    products: ['other', 'none', 'unknown', 'none'],
    +  },
     ];
     
     /** A mock of curated genders */
    @@ -431,44 +1206,93 @@ const genders: Array<string> = ['male', 'female',
     /** A mock of the tokens in the system. */
     const tokens: Array<Token> = [
       {
    -    name: 'Giftable Reserve', symbol: 'GRZ', address: '0xa686005CE37Dce7738436256982C3903f2E4ea8E', supply: '1000000001000000000000000000',
    -    decimals: '18', reserves: {}
    +    name: 'Giftable Reserve',
    +    symbol: 'GRZ',
    +    address: '0xa686005CE37Dce7738436256982C3903f2E4ea8E',
    +    supply: '1000000001000000000000000000',
    +    decimals: '18',
    +    reserves: {},
       },
       {
    -    name: 'Demo Token', symbol: 'DEMO', address: '0xc80D6aFF8194114c52AEcD84c9f15fd5c8abb187', supply: '99999999999999998976',
    -    decimals: '18', reserves: {'0xa686005CE37Dce7738436256982C3903f2E4ea8E': {weight: '1000000', balance: '99999999999999998976'}},
    -    reserveRatio: '1000000', owner: '0x3Da99AAD2D9CA01D131eFc3B17444b832B31Ff4a'
    +    name: 'Demo Token',
    +    symbol: 'DEMO',
    +    address: '0xc80D6aFF8194114c52AEcD84c9f15fd5c8abb187',
    +    supply: '99999999999999998976',
    +    decimals: '18',
    +    reserves: {
    +      '0xa686005CE37Dce7738436256982C3903f2E4ea8E': {
    +        weight: '1000000',
    +        balance: '99999999999999998976',
    +      },
    +    },
    +    reserveRatio: '1000000',
    +    owner: '0x3Da99AAD2D9CA01D131eFc3B17444b832B31Ff4a',
       },
       {
    -    name: 'Foo Token', symbol: 'FOO', address: '0x9ceD86089f7aBB5A97B40eb0E7521e7aa308d354', supply: '1000000000000000001014',
    -    decimals: '18', reserves: {'0xa686005CE37Dce7738436256982C3903f2E4ea8E': {weight: '1000000', balance: '1000000000000000001014'}},
    -    reserveRatio: '1000000', owner: '0x3Da99AAD2D9CA01D131eFc3B17444b832B31Ff4a'
    +    name: 'Foo Token',
    +    symbol: 'FOO',
    +    address: '0x9ceD86089f7aBB5A97B40eb0E7521e7aa308d354',
    +    supply: '1000000000000000001014',
    +    decimals: '18',
    +    reserves: {
    +      '0xa686005CE37Dce7738436256982C3903f2E4ea8E': {
    +        weight: '1000000',
    +        balance: '1000000000000000001014',
    +      },
    +    },
    +    reserveRatio: '1000000',
    +    owner: '0x3Da99AAD2D9CA01D131eFc3B17444b832B31Ff4a',
       },
       {
    -    name: 'testb', symbol: 'tstb', address: '0xC63cFA91A3BFf41cE31Ff436f67D3ACBC977DB95', supply: '99000', decimals: '18',
    -    reserves: {'0xa686005CE37Dce7738436256982C3903f2E4ea8E': {weight: '1000000', balance: '99000'}}, reserveRatio: '1000000',
    -    owner: '0x3Da99AAD2D9CA01D131eFc3B17444b832B31Ff4a'
    +    name: 'testb',
    +    symbol: 'tstb',
    +    address: '0xC63cFA91A3BFf41cE31Ff436f67D3ACBC977DB95',
    +    supply: '99000',
    +    decimals: '18',
    +    reserves: {
    +      '0xa686005CE37Dce7738436256982C3903f2E4ea8E': { weight: '1000000', balance: '99000' },
    +    },
    +    reserveRatio: '1000000',
    +    owner: '0x3Da99AAD2D9CA01D131eFc3B17444b832B31Ff4a',
       },
       {
    -    name: 'testa', symbol: 'tsta', address: '0x8fA4101ef19D0a078239d035659e92b278bD083C', supply: '9981', decimals: '18',
    -    reserves: {'0xa686005CE37Dce7738436256982C3903f2E4ea8E': {weight: '1000000', balance: '9981'}}, reserveRatio: '1000000',
    -    owner: '0x3Da99AAD2D9CA01D131eFc3B17444b832B31Ff4a'
    +    name: 'testa',
    +    symbol: 'tsta',
    +    address: '0x8fA4101ef19D0a078239d035659e92b278bD083C',
    +    supply: '9981',
    +    decimals: '18',
    +    reserves: {
    +      '0xa686005CE37Dce7738436256982C3903f2E4ea8E': { weight: '1000000', balance: '9981' },
    +    },
    +    reserveRatio: '1000000',
    +    owner: '0x3Da99AAD2D9CA01D131eFc3B17444b832B31Ff4a',
       },
       {
    -    name: 'testc', symbol: 'tstc', address: '0x4A6fA6bc3BfE4C9661bC692D9798425350C9e3D4', supply: '100990', decimals: '18',
    -    reserves: {'0xa686005CE37Dce7738436256982C3903f2E4ea8E': {weight: '1000000', balance: '100990'}}, reserveRatio: '1000000',
    -    owner: '0x3Da99AAD2D9CA01D131eFc3B17444b832B31Ff4a'
    -  }
    +    name: 'testc',
    +    symbol: 'tstc',
    +    address: '0x4A6fA6bc3BfE4C9661bC692D9798425350C9e3D4',
    +    supply: '100990',
    +    decimals: '18',
    +    reserves: {
    +      '0xa686005CE37Dce7738436256982C3903f2E4ea8E': { weight: '1000000', balance: '100990' },
    +    },
    +    reserveRatio: '1000000',
    +    owner: '0x3Da99AAD2D9CA01D131eFc3B17444b832B31Ff4a',
    +  },
     ];
     
     /** A mock of curated  transaction types. */
    -const transactionTypes: Array<string> = ['transactions', 'conversions', 'disbursements', 'rewards', 'reclamation'];
    +const transactionTypes: Array<string> = [
    +  'transactions',
    +  'conversions',
    +  'disbursements',
    +  'rewards',
    +  'reclamation',
    +];
     
     /**
      * Intercepts HTTP requests and handles some specified requests internally.
      * Provides a backend that can handle requests for certain data items.
    - *
    - * @implements HttpInterceptor
      */
     @Injectable()
     export class MockBackendInterceptor implements HttpInterceptor {
    @@ -530,7 +1354,7 @@ export class MockBackendInterceptor implements HttpInterceptor {
         // route functions
     
         function approveAction(): Observable<HttpResponse<any>> {
    -      const queriedAction: Action = actions.find(action => action.id === idFromUrl());
    +      const queriedAction: Action = actions.find((action) => action.id === idFromUrl());
           queriedAction.approval = body.approval;
           const message: string = `Action approval status set to ${body.approval} successfully!`;
           return ok(message);
    @@ -545,37 +1369,43 @@ export class MockBackendInterceptor implements HttpInterceptor {
         }
     
         function getActionById(): Observable<HttpResponse<any>> {
    -      const queriedAction: Action = actions.find(action => action.id === idFromUrl());
    +      const queriedAction: Action = actions.find((action) => action.id === idFromUrl());
           return ok(queriedAction);
         }
     
         function getAreaNames(): Observable<HttpResponse<any>> {
    -      const areaNameList: Array<string> = areaNames.map(areaName => areaName.name);
    +      const areaNameList: Array<string> = areaNames.map((areaName) => areaName.name);
           return ok(areaNameList);
         }
     
         function getAreaNameByLocation(): Observable<HttpResponse<any>> {
    -      const queriedAreaName: AreaName = areaNames.find(areaName => areaName.locations.includes(stringFromUrl()));
    +      const queriedAreaName: AreaName = areaNames.find((areaName) =>
    +        areaName.locations.includes(stringFromUrl())
    +      );
           return ok(queriedAreaName.name);
         }
     
         function getAreaTypes(): Observable<HttpResponse<any>> {
    -      const areaTypeList: Array<string> = areaTypes.map(areaType => areaType.name);
    +      const areaTypeList: Array<string> = areaTypes.map((areaType) => areaType.name);
           return ok(areaTypeList);
         }
     
         function getAreaTypeByArea(): Observable<HttpResponse<any>> {
    -      const queriedAreaType: AreaType = areaTypes.find(areaType => areaType.area.includes(stringFromUrl()));
    +      const queriedAreaType: AreaType = areaTypes.find((areaType) =>
    +        areaType.area.includes(stringFromUrl())
    +      );
           return ok(queriedAreaType.name);
         }
     
         function getCategories(): Observable<HttpResponse<any>> {
    -      const categoryList: Array<string> = categories.map(category => category.name);
    +      const categoryList: Array<string> = categories.map((category) => category.name);
           return ok(categoryList);
         }
     
         function getCategoryByProduct(): Observable<HttpResponse<any>> {
    -      const queriedCategory: Category = categories.find(category => category.products.includes(stringFromUrl()));
    +      const queriedCategory: Category = categories.find((category) =>
    +        category.products.includes(stringFromUrl())
    +      );
           return ok(queriedCategory.name);
         }
     
    @@ -588,7 +1418,7 @@ export class MockBackendInterceptor implements HttpInterceptor {
         }
     
         function getTokenBySymbol(): Observable<HttpResponse<any>> {
    -      const queriedToken: Token = tokens.find(token => token.symbol === stringFromUrl());
    +      const queriedToken: Token = tokens.find((token) => token.symbol === stringFromUrl());
           return ok(queriedToken);
         }
     
    @@ -618,15 +1448,11 @@ export class MockBackendInterceptor implements HttpInterceptor {
       }
     }
     
    -/**
    - * Exports the MockBackendInterceptor as an Angular provider.
    - *
    - * @exports
    - */
    +/** Exports the MockBackendInterceptor as an Angular provider. */
     export const MockBackendProvider = {
       provide: HTTP_INTERCEPTORS,
       useClass: MockBackendInterceptor,
    -  multi: true
    +  multi: true,
     };
     
    diff --git a/docs/compodoc/interfaces/AccountDetails.html b/docs/compodoc/interfaces/AccountDetails.html index c456a95..3e901bc 100644 --- a/docs/compodoc/interfaces/AccountDetails.html +++ b/docs/compodoc/interfaces/AccountDetails.html @@ -460,24 +460,34 @@ products: string[]; category?: string; vcard: { - email: [{ - value: string; - }]; - fn: [{ - value: string; - }]; - n: [{ - value: string[]; - }]; - tel: [{ - meta: { - TYP: string[]; - }, - value: string; - }], - version: [{ - value: string; - }]; + email: [ + { + value: string; + } + ]; + fn: [ + { + value: string; + } + ]; + n: [ + { + value: string[]; + } + ]; + tel: [ + { + meta: { + TYP: string[]; + }; + value: string; + } + ]; + version: [ + { + value: string; + } + ]; }; } @@ -515,34 +525,38 @@ const defaultAccount: AccountDetails = { }, products: [], vcard: { - email: [{ - value: '', - }], - fn: [{ - value: 'Sarafu Contract', - }], - n: [{ - value: ['Sarafu', 'Contract'], - }], - tel: [{ - meta: { - TYP: [], + email: [ + { + value: '', }, - value: '', - }], - version: [{ - value: '3.0', - }], + ], + fn: [ + { + value: 'Sarafu Contract', + }, + ], + n: [ + { + value: ['Sarafu', 'Contract'], + }, + ], + tel: [ + { + meta: { + TYP: [], + }, + value: '', + }, + ], + version: [ + { + value: '3.0', + }, + ], }, }; -export { - AccountDetails, - Signature, - Meta, - MetaResponse, - defaultAccount -}; +export { AccountDetails, Signature, Meta, MetaResponse, defaultAccount };
    diff --git a/docs/compodoc/interfaces/Action.html b/docs/compodoc/interfaces/Action.html index 61c346a..83c87e0 100644 --- a/docs/compodoc/interfaces/Action.html +++ b/docs/compodoc/interfaces/Action.html @@ -277,12 +277,7 @@ interface AreaType { area: Array<string>; } -export { - Action, - Category, - AreaName, - AreaType -}; +export { Action, Category, AreaName, AreaType };
    diff --git a/docs/compodoc/interfaces/AreaName.html b/docs/compodoc/interfaces/AreaName.html index d66ecf2..9c9a4c9 100644 --- a/docs/compodoc/interfaces/AreaName.html +++ b/docs/compodoc/interfaces/AreaName.html @@ -181,12 +181,7 @@ interface AreaType { area: Array<string>; } -export { - Action, - Category, - AreaName, - AreaType -}; +export { Action, Category, AreaName, AreaType };
    diff --git a/docs/compodoc/interfaces/AreaType.html b/docs/compodoc/interfaces/AreaType.html index 1cfb4b7..5e4ef57 100644 --- a/docs/compodoc/interfaces/AreaType.html +++ b/docs/compodoc/interfaces/AreaType.html @@ -181,12 +181,7 @@ interface AreaType { area: Array<string>; } -export { - Action, - Category, - AreaName, - AreaType -}; +export { Action, Category, AreaName, AreaType };
    diff --git a/docs/compodoc/interfaces/Category.html b/docs/compodoc/interfaces/Category.html index 039e236..e664d8c 100644 --- a/docs/compodoc/interfaces/Category.html +++ b/docs/compodoc/interfaces/Category.html @@ -181,12 +181,7 @@ interface AreaType { area: Array<string>; } -export { - Action, - Category, - AreaName, - AreaType -}; +export { Action, Category, AreaName, AreaType };
    diff --git a/docs/compodoc/interfaces/Meta.html b/docs/compodoc/interfaces/Meta.html index f983653..837adbc 100644 --- a/docs/compodoc/interfaces/Meta.html +++ b/docs/compodoc/interfaces/Meta.html @@ -212,24 +212,34 @@ products: string[]; category?: string; vcard: { - email: [{ - value: string; - }]; - fn: [{ - value: string; - }]; - n: [{ - value: string[]; - }]; - tel: [{ - meta: { - TYP: string[]; - }, - value: string; - }], - version: [{ - value: string; - }]; + email: [ + { + value: string; + } + ]; + fn: [ + { + value: string; + } + ]; + n: [ + { + value: string[]; + } + ]; + tel: [ + { + meta: { + TYP: string[]; + }; + value: string; + } + ]; + version: [ + { + value: string; + } + ]; }; } @@ -267,34 +277,38 @@ const defaultAccount: AccountDetails = { }, products: [], vcard: { - email: [{ - value: '', - }], - fn: [{ - value: 'Sarafu Contract', - }], - n: [{ - value: ['Sarafu', 'Contract'], - }], - tel: [{ - meta: { - TYP: [], + email: [ + { + value: '', }, - value: '', - }], - version: [{ - value: '3.0', - }], + ], + fn: [ + { + value: 'Sarafu Contract', + }, + ], + n: [ + { + value: ['Sarafu', 'Contract'], + }, + ], + tel: [ + { + meta: { + TYP: [], + }, + value: '', + }, + ], + version: [ + { + value: '3.0', + }, + ], }, }; -export { - AccountDetails, - Signature, - Meta, - MetaResponse, - defaultAccount -}; +export { AccountDetails, Signature, Meta, MetaResponse, defaultAccount };
    diff --git a/docs/compodoc/interfaces/MetaResponse.html b/docs/compodoc/interfaces/MetaResponse.html index e842da3..ddb8564 100644 --- a/docs/compodoc/interfaces/MetaResponse.html +++ b/docs/compodoc/interfaces/MetaResponse.html @@ -180,24 +180,34 @@ products: string[]; category?: string; vcard: { - email: [{ - value: string; - }]; - fn: [{ - value: string; - }]; - n: [{ - value: string[]; - }]; - tel: [{ - meta: { - TYP: string[]; - }, - value: string; - }], - version: [{ - value: string; - }]; + email: [ + { + value: string; + } + ]; + fn: [ + { + value: string; + } + ]; + n: [ + { + value: string[]; + } + ]; + tel: [ + { + meta: { + TYP: string[]; + }; + value: string; + } + ]; + version: [ + { + value: string; + } + ]; }; } @@ -235,34 +245,38 @@ const defaultAccount: AccountDetails = { }, products: [], vcard: { - email: [{ - value: '', - }], - fn: [{ - value: 'Sarafu Contract', - }], - n: [{ - value: ['Sarafu', 'Contract'], - }], - tel: [{ - meta: { - TYP: [], + email: [ + { + value: '', }, - value: '', - }], - version: [{ - value: '3.0', - }], + ], + fn: [ + { + value: 'Sarafu Contract', + }, + ], + n: [ + { + value: ['Sarafu', 'Contract'], + }, + ], + tel: [ + { + meta: { + TYP: [], + }, + value: '', + }, + ], + version: [ + { + value: '3.0', + }, + ], }, }; -export { - AccountDetails, - Signature, - Meta, - MetaResponse, - defaultAccount -}; +export { AccountDetails, Signature, Meta, MetaResponse, defaultAccount };
    diff --git a/docs/compodoc/interfaces/MutableKeyStore.html b/docs/compodoc/interfaces/MutableKeyStore.html index f06107f..16785e1 100644 --- a/docs/compodoc/interfaces/MutableKeyStore.html +++ b/docs/compodoc/interfaces/MutableKeyStore.html @@ -193,8 +193,8 @@ - + @@ -232,8 +232,8 @@ - + @@ -271,8 +271,8 @@ - + @@ -310,8 +310,8 @@ - + @@ -380,8 +380,8 @@ - + @@ -450,8 +450,8 @@ - + @@ -489,8 +489,8 @@ - + @@ -559,8 +559,8 @@ - + @@ -598,8 +598,8 @@ - + @@ -637,8 +637,8 @@ - + @@ -707,8 +707,8 @@ - + @@ -777,8 +777,8 @@ - + @@ -816,8 +816,8 @@ - + @@ -886,8 +886,8 @@ - + @@ -925,8 +925,8 @@ - + @@ -964,8 +964,8 @@ - + @@ -1046,8 +1046,8 @@ - + @@ -1116,8 +1116,8 @@ - + @@ -1186,8 +1186,8 @@ - + @@ -1256,8 +1256,8 @@ - + @@ -1326,8 +1326,8 @@ - + @@ -1365,8 +1365,8 @@ - + @@ -1435,8 +1435,8 @@ - + @@ -1505,8 +1505,8 @@ - + @@ -1575,8 +1575,8 @@ - + @@ -1634,9 +1634,6 @@ import * as openpgp from 'openpgp'; const keyring = new openpgp.Keyring(); -/** - * @extends - */ interface MutableKeyStore extends KeyStore { loadKeyring(): void; importKeyPair(publicKey: any, privateKey: any): Promise<void>; @@ -1665,11 +1662,7 @@ interface MutableKeyStore extends KeyStore { sign(plainText: string): Promise<any>; } -/** - * @implements - */ -class MutablePgpKeyStore implements MutableKeyStore{ - +class MutablePgpKeyStore implements MutableKeyStore { async loadKeyring(): Promise<void> { await keyring.load(); await keyring.store(); @@ -1714,8 +1707,8 @@ class MutablePgpKeyStore implements MutableKeyStore{ async isValidKey(key): Promise<boolean> { // There is supposed to be an openpgp.readKey() method but I can't find it? - const _key = await openpgp.key.readArmored(key); - return !_key.err; + const testKey = await openpgp.key.readArmored(key); + return !testKey.err; } async isEncryptedPrivateKey(privateKey: any): Promise<boolean> { @@ -1730,8 +1723,12 @@ class MutablePgpKeyStore implements MutableKeyStore{ getFingerprint(): string { // TODO Handle multiple keys - return keyring.privateKeys && keyring.privateKeys.keys[0] && keyring.privateKeys.keys[0].keyPacket && - keyring.privateKeys.keys[0].keyPacket.fingerprint; + return ( + keyring.privateKeys && + keyring.privateKeys.keys[0] && + keyring.privateKeys.keys[0].keyPacket && + keyring.privateKeys.keys[0].keyPacket.fingerprint + ); } getKeyId(key: any): string { @@ -1740,7 +1737,11 @@ class MutablePgpKeyStore implements MutableKeyStore{ getPrivateKeyId(): string { // TODO is there a library that comes with angular for doing this? - return keyring.privateKeys && keyring.privateKeys.keys[0] && keyring.privateKeys.keys[0].getKeyId().toHex(); + return ( + keyring.privateKeys && + keyring.privateKeys.keys[0] && + keyring.privateKeys.keys[0].getKeyId().toHex() + ); } getKeysForId(keyId: string): Array<any> { @@ -1772,7 +1773,7 @@ class MutablePgpKeyStore implements MutableKeyStore{ } removePublicKey(publicKey: any): any { - const keyId = publicKey.getKeyId().toHex(); + const keyId = publicKey.getKeyId().toHex(); return keyring.publicKeys.removeForId(keyId); } @@ -1796,10 +1797,7 @@ class MutablePgpKeyStore implements MutableKeyStore{ } } -export { - MutablePgpKeyStore, - MutableKeyStore -}; +export { MutablePgpKeyStore, MutableKeyStore };
    diff --git a/docs/compodoc/interfaces/Signable.html b/docs/compodoc/interfaces/Signable.html index df4dbeb..11196c9 100644 --- a/docs/compodoc/interfaces/Signable.html +++ b/docs/compodoc/interfaces/Signable.html @@ -138,8 +138,8 @@
    -
    import {MutableKeyStore} from '@app/_pgp/pgp-key-store';
    -import {LoggingService} from '@app/_services/logging.service';
    +        
    import { MutableKeyStore } from '@app/_pgp/pgp-key-store';
    +import { LoggingService } from '@app/_services/logging.service';
     
     const openpgp = require('openpgp');
     
    @@ -147,12 +147,12 @@ interface Signable {
       digest(): string;
     }
     
    -type Signature = {
    -  engine: string
    -  algo: string
    -  data: string
    +interface Signature {
    +  engine: string;
    +  algo: string;
    +  data: string;
       digest: string;
    -};
    +}
     
     interface Signer {
       onsign(signature: Signature): void;
    @@ -164,7 +164,6 @@ interface Signer {
     }
     
     class PGPSigner implements Signer {
    -
       engine = 'pgp';
       algo = 'sha256';
       dgst: string;
    @@ -190,28 +189,35 @@ class PGPSigner implements Signer {
       }
     
       public verify(digest: string, signature: Signature): void {
    -    openpgp.signature.readArmored(signature.data).then((sig) => {
    -      const opts = {
    -        message: openpgp.cleartext.fromText(digest),
    -        publicKeys: this.keyStore.getTrustedKeys(),
    -        signature: sig,
    -      };
    -      openpgp.verify(opts).then((v) => {
    -        let i = 0;
    -        for (i = 0; i < v.signatures.length; i++) {
    -          const s = v.signatures[i];
    -          if (s.valid) {
    -            this.onverify(s);
    -            return;
    +    openpgp.signature
    +      .readArmored(signature.data)
    +      .then((sig) => {
    +        const opts = {
    +          message: openpgp.cleartext.fromText(digest),
    +          publicKeys: this.keyStore.getTrustedKeys(),
    +          signature: sig,
    +        };
    +        openpgp.verify(opts).then((v) => {
    +          let i = 0;
    +          for (i = 0; i < v.signatures.length; i++) {
    +            const s = v.signatures[i];
    +            if (s.valid) {
    +              this.onverify(s);
    +              return;
    +            }
               }
    -        }
    -        this.loggingService.sendErrorLevelMessage(`Checked ${i} signature(s) but none valid`, this, {error: '404 Not found!'});
    +          this.loggingService.sendErrorLevelMessage(
    +            `Checked ${i} signature(s) but none valid`,
    +            this,
    +            { error: '404 Not found!' }
    +          );
    +          this.onverify(false);
    +        });
    +      })
    +      .catch((e) => {
    +        this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
             this.onverify(false);
           });
    -    }).catch((e) => {
    -      this.loggingService.sendErrorLevelMessage(e.message, this, {error: e});
    -      this.onverify(false);
    -    });
       }
     
       public async sign(digest: string): Promise<void> {
    @@ -226,28 +232,26 @@ class PGPSigner implements Signer {
           privateKeys: [pk],
           detached: true,
         };
    -    openpgp.sign(opts).then((s) => {
    -      this.signature = {
    -        engine: this.engine,
    -        algo: this.algo,
    -        data: s.signature,
    -        // TODO: fix for browser later
    -        digest,
    -      };
    -      this.onsign(this.signature);
    -    }).catch((e) => {
    -      this.loggingService.sendErrorLevelMessage(e.message, this, {error: e});
    -      this.onsign(undefined);
    -    });
    +    openpgp
    +      .sign(opts)
    +      .then((s) => {
    +        this.signature = {
    +          engine: this.engine,
    +          algo: this.algo,
    +          data: s.signature,
    +          // TODO: fix for browser later
    +          digest,
    +        };
    +        this.onsign(this.signature);
    +      })
    +      .catch((e) => {
    +        this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
    +        this.onsign(undefined);
    +      });
       }
     }
     
    -export {
    -  Signable,
    -  Signature,
    -  Signer,
    -  PGPSigner
    -};
    +export { Signable, Signature, Signer, PGPSigner };
     
    diff --git a/docs/compodoc/interfaces/Signature-1.html b/docs/compodoc/interfaces/Signature-1.html new file mode 100644 index 0000000..ae384b9 --- /dev/null +++ b/docs/compodoc/interfaces/Signature-1.html @@ -0,0 +1,398 @@ + + + + + + CICADA + + + + + + + + + + + + +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + +
    +
    +

    +

    File

    +

    +

    + src/app/_pgp/pgp-signer.ts +

    + + + +
    +

    Index

    + + + + + + + + + +
    +
    Properties
    +
    + +
    +
    + + + +
    +

    Properties

    + + + + + + + + + + + + + + + + + + + +
    + + algo +
    + algo: string + +
    + Type : string + +
    + + + + + + + + + + + + + + + + + + + +
    + + data +
    + data: string + +
    + Type : string + +
    + + + + + + + + + + + + + + + + + + + +
    + + digest +
    + digest: string + +
    + Type : string + +
    + + + + + + + + + + + + + + + + + + + +
    + + engine +
    + engine: string + +
    + Type : string + +
    +
    +
    + + +
    +
    import { MutableKeyStore } from '@app/_pgp/pgp-key-store';
    +import { LoggingService } from '@app/_services/logging.service';
    +
    +const openpgp = require('openpgp');
    +
    +interface Signable {
    +  digest(): string;
    +}
    +
    +interface Signature {
    +  engine: string;
    +  algo: string;
    +  data: string;
    +  digest: string;
    +}
    +
    +interface Signer {
    +  onsign(signature: Signature): void;
    +  onverify(flag: boolean): void;
    +  fingerprint(): string;
    +  prepare(material: Signable): boolean;
    +  verify(digest: string, signature: Signature): void;
    +  sign(digest: string): Promise<void>;
    +}
    +
    +class PGPSigner implements Signer {
    +  engine = 'pgp';
    +  algo = 'sha256';
    +  dgst: string;
    +  signature: Signature;
    +  keyStore: MutableKeyStore;
    +  onsign: (signature: Signature) => void;
    +  onverify: (flag: boolean) => void;
    +  loggingService: LoggingService;
    +
    +  constructor(keyStore: MutableKeyStore) {
    +    this.keyStore = keyStore;
    +    this.onsign = (signature: Signature) => {};
    +    this.onverify = (flag: boolean) => {};
    +  }
    +
    +  public fingerprint(): string {
    +    return this.keyStore.getFingerprint();
    +  }
    +
    +  public prepare(material: Signable): boolean {
    +    this.dgst = material.digest();
    +    return true;
    +  }
    +
    +  public verify(digest: string, signature: Signature): void {
    +    openpgp.signature
    +      .readArmored(signature.data)
    +      .then((sig) => {
    +        const opts = {
    +          message: openpgp.cleartext.fromText(digest),
    +          publicKeys: this.keyStore.getTrustedKeys(),
    +          signature: sig,
    +        };
    +        openpgp.verify(opts).then((v) => {
    +          let i = 0;
    +          for (i = 0; i < v.signatures.length; i++) {
    +            const s = v.signatures[i];
    +            if (s.valid) {
    +              this.onverify(s);
    +              return;
    +            }
    +          }
    +          this.loggingService.sendErrorLevelMessage(
    +            `Checked ${i} signature(s) but none valid`,
    +            this,
    +            { error: '404 Not found!' }
    +          );
    +          this.onverify(false);
    +        });
    +      })
    +      .catch((e) => {
    +        this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
    +        this.onverify(false);
    +      });
    +  }
    +
    +  public async sign(digest: string): Promise<void> {
    +    const m = openpgp.cleartext.fromText(digest);
    +    const pk = this.keyStore.getPrivateKey();
    +    if (!pk.isDecrypted()) {
    +      const password = window.prompt('password');
    +      await pk.decrypt(password);
    +    }
    +    const opts = {
    +      message: m,
    +      privateKeys: [pk],
    +      detached: true,
    +    };
    +    openpgp
    +      .sign(opts)
    +      .then((s) => {
    +        this.signature = {
    +          engine: this.engine,
    +          algo: this.algo,
    +          data: s.signature,
    +          // TODO: fix for browser later
    +          digest,
    +        };
    +        this.onsign(this.signature);
    +      })
    +      .catch((e) => {
    +        this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
    +        this.onsign(undefined);
    +      });
    +  }
    +}
    +
    +export { Signable, Signature, Signer, PGPSigner };
    +
    +
    +
    + + + + + + + +
    +
    +

    result-matching ""

    +
      +
      +
      +

      No results matching ""

      +
      +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/compodoc/interfaces/Signature.html b/docs/compodoc/interfaces/Signature.html index ed2e813..a68f675 100644 --- a/docs/compodoc/interfaces/Signature.html +++ b/docs/compodoc/interfaces/Signature.html @@ -244,24 +244,34 @@ products: string[]; category?: string; vcard: { - email: [{ - value: string; - }]; - fn: [{ - value: string; - }]; - n: [{ - value: string[]; - }]; - tel: [{ - meta: { - TYP: string[]; - }, - value: string; - }], - version: [{ - value: string; - }]; + email: [ + { + value: string; + } + ]; + fn: [ + { + value: string; + } + ]; + n: [ + { + value: string[]; + } + ]; + tel: [ + { + meta: { + TYP: string[]; + }; + value: string; + } + ]; + version: [ + { + value: string; + } + ]; }; } @@ -299,34 +309,38 @@ const defaultAccount: AccountDetails = { }, products: [], vcard: { - email: [{ - value: '', - }], - fn: [{ - value: 'Sarafu Contract', - }], - n: [{ - value: ['Sarafu', 'Contract'], - }], - tel: [{ - meta: { - TYP: [], + email: [ + { + value: '', }, - value: '', - }], - version: [{ - value: '3.0', - }], + ], + fn: [ + { + value: 'Sarafu Contract', + }, + ], + n: [ + { + value: ['Sarafu', 'Contract'], + }, + ], + tel: [ + { + meta: { + TYP: [], + }, + value: '', + }, + ], + version: [ + { + value: '3.0', + }, + ], }, }; -export { - AccountDetails, - Signature, - Meta, - MetaResponse, - defaultAccount -}; +export { AccountDetails, Signature, Meta, MetaResponse, defaultAccount };
      diff --git a/docs/compodoc/interfaces/Signer.html b/docs/compodoc/interfaces/Signer.html index 6fc455b..c157e14 100644 --- a/docs/compodoc/interfaces/Signer.html +++ b/docs/compodoc/interfaces/Signer.html @@ -515,8 +515,8 @@
      -
      import {MutableKeyStore} from '@app/_pgp/pgp-key-store';
      -import {LoggingService} from '@app/_services/logging.service';
      +        
      import { MutableKeyStore } from '@app/_pgp/pgp-key-store';
      +import { LoggingService } from '@app/_services/logging.service';
       
       const openpgp = require('openpgp');
       
      @@ -524,12 +524,12 @@ interface Signable {
         digest(): string;
       }
       
      -type Signature = {
      -  engine: string
      -  algo: string
      -  data: string
      +interface Signature {
      +  engine: string;
      +  algo: string;
      +  data: string;
         digest: string;
      -};
      +}
       
       interface Signer {
         onsign(signature: Signature): void;
      @@ -541,7 +541,6 @@ interface Signer {
       }
       
       class PGPSigner implements Signer {
      -
         engine = 'pgp';
         algo = 'sha256';
         dgst: string;
      @@ -567,28 +566,35 @@ class PGPSigner implements Signer {
         }
       
         public verify(digest: string, signature: Signature): void {
      -    openpgp.signature.readArmored(signature.data).then((sig) => {
      -      const opts = {
      -        message: openpgp.cleartext.fromText(digest),
      -        publicKeys: this.keyStore.getTrustedKeys(),
      -        signature: sig,
      -      };
      -      openpgp.verify(opts).then((v) => {
      -        let i = 0;
      -        for (i = 0; i < v.signatures.length; i++) {
      -          const s = v.signatures[i];
      -          if (s.valid) {
      -            this.onverify(s);
      -            return;
      +    openpgp.signature
      +      .readArmored(signature.data)
      +      .then((sig) => {
      +        const opts = {
      +          message: openpgp.cleartext.fromText(digest),
      +          publicKeys: this.keyStore.getTrustedKeys(),
      +          signature: sig,
      +        };
      +        openpgp.verify(opts).then((v) => {
      +          let i = 0;
      +          for (i = 0; i < v.signatures.length; i++) {
      +            const s = v.signatures[i];
      +            if (s.valid) {
      +              this.onverify(s);
      +              return;
      +            }
                 }
      -        }
      -        this.loggingService.sendErrorLevelMessage(`Checked ${i} signature(s) but none valid`, this, {error: '404 Not found!'});
      +          this.loggingService.sendErrorLevelMessage(
      +            `Checked ${i} signature(s) but none valid`,
      +            this,
      +            { error: '404 Not found!' }
      +          );
      +          this.onverify(false);
      +        });
      +      })
      +      .catch((e) => {
      +        this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
               this.onverify(false);
             });
      -    }).catch((e) => {
      -      this.loggingService.sendErrorLevelMessage(e.message, this, {error: e});
      -      this.onverify(false);
      -    });
         }
       
         public async sign(digest: string): Promise<void> {
      @@ -603,28 +609,26 @@ class PGPSigner implements Signer {
             privateKeys: [pk],
             detached: true,
           };
      -    openpgp.sign(opts).then((s) => {
      -      this.signature = {
      -        engine: this.engine,
      -        algo: this.algo,
      -        data: s.signature,
      -        // TODO: fix for browser later
      -        digest,
      -      };
      -      this.onsign(this.signature);
      -    }).catch((e) => {
      -      this.loggingService.sendErrorLevelMessage(e.message, this, {error: e});
      -      this.onsign(undefined);
      -    });
      +    openpgp
      +      .sign(opts)
      +      .then((s) => {
      +        this.signature = {
      +          engine: this.engine,
      +          algo: this.algo,
      +          data: s.signature,
      +          // TODO: fix for browser later
      +          digest,
      +        };
      +        this.onsign(this.signature);
      +      })
      +      .catch((e) => {
      +        this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
      +        this.onsign(undefined);
      +      });
         }
       }
       
      -export {
      -  Signable,
      -  Signature,
      -  Signer,
      -  PGPSigner
      -};
      +export { Signable, Signature, Signer, PGPSigner };
       
      diff --git a/docs/compodoc/interfaces/Staff.html b/docs/compodoc/interfaces/Staff.html index e7fb98b..753825a 100644 --- a/docs/compodoc/interfaces/Staff.html +++ b/docs/compodoc/interfaces/Staff.html @@ -262,9 +262,7 @@ userid: string; } -export { - Staff -}; +export { Staff }; diff --git a/docs/compodoc/interfaces/Token.html b/docs/compodoc/interfaces/Token.html index 4b94d96..25104c9 100644 --- a/docs/compodoc/interfaces/Token.html +++ b/docs/compodoc/interfaces/Token.html @@ -372,15 +372,13 @@ '0xa686005CE37Dce7738436256982C3903f2E4ea8E'?: { weight: string; balance: string; - } + }; }; reserveRatio?: string; owner?: string; } -export { - Token -}; +export { Token };
      diff --git a/docs/compodoc/js/menu-wc.js b/docs/compodoc/js/menu-wc.js index cbf6171..fb98456 100644 --- a/docs/compodoc/js/menu-wc.js +++ b/docs/compodoc/js/menu-wc.js @@ -60,13 +60,13 @@ customElements.define('compodoc-menu', class extends HTMLElement { AccountsModule
    • -