Add path shortcuts to all paths in the system.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { BlockSyncService } from './block-sync.service';
|
||||
import {TransactionService} from './transaction.service';
|
||||
import {TransactionServiceStub} from '../../testing';
|
||||
import { BlockSyncService } from '@app/_services/block-sync.service';
|
||||
import {TransactionService} from '@app/_services/transaction.service';
|
||||
import {TransactionServiceStub} from '@src/testing';
|
||||
|
||||
describe('BlockSyncService', () => {
|
||||
let service: BlockSyncService;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {Settings} from '../_models';
|
||||
import {Settings} from '@app/_models';
|
||||
import Web3 from 'web3';
|
||||
import {abi, Registry, TransactionHelper} from 'cic-client';
|
||||
import {first} from 'rxjs/operators';
|
||||
import {TransactionService} from './transaction.service';
|
||||
import {environment} from '../../environments/environment';
|
||||
const cic = require('../../assets/js/block-sync/cic-client.web');
|
||||
import {TransactionService} from '@app/_services/transaction.service';
|
||||
import {environment} from '@src/environments/environment';
|
||||
const cic = require('@src/assets/js/block-sync/cic-client.web');
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export * from '@app/_services/auth.service';
|
||||
export * from './transaction.service';
|
||||
export * from './user.service';
|
||||
export * from './token.service';
|
||||
export * from './block-sync.service';
|
||||
export * from './location.service';
|
||||
export * from '@app/_services/transaction.service';
|
||||
export * from '@app/_services/user.service';
|
||||
export * from '@app/_services/token.service';
|
||||
export * from '@app/_services/block-sync.service';
|
||||
export * from '@app/_services/location.service';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { LocationService } from './location.service';
|
||||
import { LocationService } from '@app/_services/location.service';
|
||||
|
||||
describe('LocationService', () => {
|
||||
let service: LocationService;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {BehaviorSubject} from 'rxjs';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {environment} from '../../environments/environment';
|
||||
import {environment} from '@src/environments/environment';
|
||||
import {first} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TokenService } from './token.service';
|
||||
import { TokenService } from '@app/_services/token.service';
|
||||
|
||||
describe('TokenService', () => {
|
||||
let service: TokenService;
|
||||
@@ -15,10 +15,10 @@ describe('TokenService', () => {
|
||||
});
|
||||
|
||||
it('should return token for available token', () => {
|
||||
expect(service.getBySymbol('RSV')).toEqual({ name: 'Reserve', symbol: 'RSV' });
|
||||
expect(service.getTokenBySymbol('RSV')).toEqual({ name: 'Reserve', symbol: 'RSV' });
|
||||
});
|
||||
|
||||
it('should not return token for unavailable token', () => {
|
||||
expect(service.getBySymbol('ABC')).toBeUndefined();
|
||||
expect(service.getTokenBySymbol('ABC')).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {environment} from '../../environments/environment';
|
||||
import {environment} from '@src/environments/environment';
|
||||
import {first} from 'rxjs/operators';
|
||||
import {BehaviorSubject} from 'rxjs';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {fakeAsync, TestBed, tick} from '@angular/core/testing';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TransactionService } from './transaction.service';
|
||||
import { TransactionService } from '@app/_services/transaction.service';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
|
||||
|
||||
@@ -21,12 +21,4 @@ describe('TransactionService', () => {
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
|
||||
// it('#getUser() should fetch userInfo', fakeAsync(() => {
|
||||
// expect(service.userInfo).toBeUndefined();
|
||||
// service.getUser('0x9D7c284907acbd4a0cE2dDD0AA69147A921a573D').then(
|
||||
// );
|
||||
// tick();
|
||||
// expect(service.userInfo).toBe('Hey');
|
||||
// }));
|
||||
});
|
||||
|
||||
@@ -2,11 +2,11 @@ import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {first, map} from 'rxjs/operators';
|
||||
import {BehaviorSubject, Observable} from 'rxjs';
|
||||
import {environment} from '../../environments/environment';
|
||||
import {environment} from '@src/environments/environment';
|
||||
import {User} from 'cic-client-meta';
|
||||
import {UserService} from './user.service';
|
||||
import {parse} from '../../assets/js/parse-vcard';
|
||||
import { AccountIndex } from '../_helpers';
|
||||
import {UserService} from '@app/_services/user.service';
|
||||
import {parse} from '@src/assets/js/parse-vcard';
|
||||
import { AccountIndex } from '@app/_helpers';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { UserService } from './user.service';
|
||||
import { UserService } from '@app/_services/user.service';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
|
||||
|
||||
@@ -23,7 +23,7 @@ describe('UserService', () => {
|
||||
});
|
||||
|
||||
it('should return user for available id', () => {
|
||||
expect(service.getUserById('1')).toEqual({
|
||||
expect(service.getAccountById(1)).toEqual({
|
||||
id: 1,
|
||||
name: 'John Doe',
|
||||
phone: '+25412345678',
|
||||
@@ -39,7 +39,7 @@ describe('UserService', () => {
|
||||
});
|
||||
|
||||
it('should not return user for unavailable id', () => {
|
||||
expect(service.getUserById('9999999999')).toBeUndefined();
|
||||
expect(service.getAccountById(9999999999)).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should return action for available id', () => {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {BehaviorSubject, Observable, of} from 'rxjs';
|
||||
import {BehaviorSubject, Observable} from 'rxjs';
|
||||
import {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';
|
||||
import {environment} from '../../environments/environment';
|
||||
import {environment} from '@src/environments/environment';
|
||||
import {first, map} from 'rxjs/operators';
|
||||
import { ArgPair, Envelope, Syncable } from '../../assets/js/cic-meta/sync.js';
|
||||
import {PGPSigner, Signer} from '../_helpers';
|
||||
import { ArgPair, Envelope, Syncable } from '@src/assets/js/cic-meta/sync.js';
|
||||
import {MutableKeyStore, MutablePgpKeyStore, PGPSigner, Signer} from '@app/_helpers';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class UserService {
|
||||
keystore = '';
|
||||
keystore: MutableKeyStore = new MutablePgpKeyStore();
|
||||
syncableAccount: Syncable;
|
||||
signer: Signer = new PGPSigner(this.keystore);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user