Lint files.

This commit is contained in:
Spencer Ofwiti 2021-08-02 22:22:38 +03:00
parent 53c547e5c4
commit 45f2bc9ea8
3 changed files with 14 additions and 14 deletions

View File

@ -10,4 +10,4 @@ export * from '@app/_helpers/read-csv';
export * from '@app/_helpers/schema-validation';
export * from '@app/_helpers/sync';
export * from '@app/_helpers/online-status';
export * from './to-hex';
export * from '@app/_helpers/to-hex';

View File

@ -46,7 +46,7 @@ export class UserService {
constructor(
private httpClient: HttpClient,
private loggingService: LoggingService,
private tokenService: TokenService,
private tokenService: TokenService
) {}
async init(): Promise<void> {
@ -81,7 +81,7 @@ export class UserService {
userLocation: string,
location: string,
locationType: string,
oldPhoneNumber: string,
oldPhoneNumber: string
): Promise<any> {
const accountInfo: any = {
vcard: {
@ -142,11 +142,11 @@ export class UserService {
this.loggingService.sendErrorLevelMessage(
'Cannot find account info in meta service',
this,
{ error },
{ error }
);
const syncableAccount: Syncable = new Syncable(accountKey, accountInfo);
await this.updateMeta(syncableAccount, accountKey, this.headers);
},
}
);
if (phoneNumber !== oldPhoneNumber) {
const oldPhoneKey: string = await Phone.toKey(oldPhoneNumber);
@ -162,7 +162,7 @@ export class UserService {
async updateMeta(
syncableAccount: Syncable,
accountKey: string,
headers: HttpHeaders,
headers: HttpHeaders
): Promise<any> {
const envelope: Envelope = await this.wrap(syncableAccount, this.signer);
const reqBody: string = envelope.toJSON();
@ -223,7 +223,7 @@ export class UserService {
this.tokenService.load.subscribe(async (status: boolean) => {
if (status) {
data.balance = await this.tokenService.getTokenBalance(
data.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0],
data.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0]
);
}
});
@ -237,7 +237,7 @@ export class UserService {
});
} else {
this.loggingService.sendInfoLevelMessage(
'Web workers are not supported in this environment',
'Web workers are not supported in this environment'
);
for (const accountAddress of accountAddresses.slice(offset, offset + limit)) {
await this.getAccountByAddress(accountAddress, limit);
@ -252,7 +252,7 @@ export class UserService {
async getAccountByAddress(
accountAddress: string,
limit: number = 100,
history: boolean = false,
history: boolean = false
): Promise<Observable<AccountDetails>> {
const accountSubject: Subject<any> = new Subject<any>();
this.getAccountDetailsFromMeta(await User.toKey(add0x(accountAddress)))
@ -272,7 +272,7 @@ export class UserService {
this.tokenService.load.subscribe(async (status: boolean) => {
if (status) {
accountInfo.balance = await this.tokenService.getTokenBalance(
accountInfo.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0],
accountInfo.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0]
);
}
});
@ -286,7 +286,7 @@ export class UserService {
async getAccountByPhone(
phoneNumber: string,
limit: number = 100,
limit: number = 100
): Promise<Observable<AccountDetails>> {
const accountSubject: Subject<any> = new Subject<any>();
this.getAccountDetailsFromMeta(await Phone.toKey(phoneNumber))
@ -318,7 +318,7 @@ export class UserService {
const keywords = product.toLowerCase().split(' ');
for (const keyword of keywords) {
const queriedCategory: string = Object.keys(categories).find((key) =>
categories[key].includes(keyword),
categories[key].includes(keyword)
);
if (queriedCategory) {
return queriedCategory;
@ -343,7 +343,7 @@ export class UserService {
const savedIndex = this.accounts.findIndex(
(acc) =>
acc.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0] ===
account.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0],
account.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0]
);
if (savedIndex === 0) {
return;

View File

@ -29,7 +29,7 @@ addEventListener('message', async ({ data }) => {
async function getAccountByAddress(
accountAddress: string,
metaUrl: string,
token: string,
token: string
): Promise<any> {
const userKey = await User.toKey(add0x(accountAddress));