diff --git a/app/lib/dal/fileDAL.ts b/app/lib/dal/fileDAL.ts index 02e8c6d2489761a2aeb260320cff5548c0e6d423..4d9ef79e7ca37b3c3fe11047e76b58d4dcda6a70 100644 --- a/app/lib/dal/fileDAL.ts +++ b/app/lib/dal/fileDAL.ts @@ -935,7 +935,11 @@ export class FileDAL implements ServerDAO { async searchJustIdentitiesByPubkey(pubkey: string): Promise<DBIdentity[]> { const pendings = await this.idtyDAL.findByPub(pubkey); const writtenIdty = await this.iindexDAL.getOldFromPubkey(pubkey); - const nonPendings = writtenIdty && Underscore.where(pendings, { pubkey: writtenIdty.pub }).length === 0 ? [writtenIdty] : []; + const nonPendings = + writtenIdty && + Underscore.where(pendings, { pubkey: writtenIdty.pub }).length === 0 + ? [writtenIdty] + : []; const found = pendings.concat( nonPendings.map((i: any) => { // Use the correct field @@ -1725,7 +1729,7 @@ export class FileDAL implements ServerDAO { local_iindex: IindexEntry[] ): Promise<SimpleUdEntryForWallet[]> { if (dividend) { - let udSources = this.dividendDAL.produceDividend( + const udSources = this.dividendDAL.produceDividend( blockNumber, dividend, unitbase, diff --git a/app/lib/dal/indexDAL/sqlite/SqliteIIndex.ts b/app/lib/dal/indexDAL/sqlite/SqliteIIndex.ts index 806ee307a6d2fc7e38831e2b2b8a7027c4bbbefc..db08c3eec74e5995c3a48b3c69495887b07d38f2 100644 --- a/app/lib/dal/indexDAL/sqlite/SqliteIIndex.ts +++ b/app/lib/dal/indexDAL/sqlite/SqliteIIndex.ts @@ -1,4 +1,9 @@ -import {FullIindexEntry, IindexEntry, Indexer, reduce} from "../../../indexer"; +import { + FullIindexEntry, + IindexEntry, + Indexer, + reduce, +} from "../../../indexer"; import { SQLiteDriver } from "../../drivers/SQLiteDriver"; import { MonitorExecutionTime } from "../../../debug/MonitorExecutionTime"; import { IIndexDAO } from "../abstract/IIndexDAO"; @@ -214,7 +219,10 @@ export class SqliteIIndex extends SqliteTable<IindexEntry> @MonitorExecutionTime() async getOldFromPubkey(pub: string): Promise<OldIindexEntry | null> { - const identities = await this.find("SELECT * FROM iindex WHERE pub = ? order by writtenOn ASC", [pub]); + const identities = await this.find( + "SELECT * FROM iindex WHERE pub = ? order by writtenOn ASC", + [pub] + ); if (!identities.length) { return null; } diff --git a/app/lib/dal/sqliteDAL/IdentityDAL.ts b/app/lib/dal/sqliteDAL/IdentityDAL.ts index 012a1646f2ef0d346e045a745fdee90fe541b656..851b27c0d7b0c7eb6dca672d88e6c8bb1d3e28df 100644 --- a/app/lib/dal/sqliteDAL/IdentityDAL.ts +++ b/app/lib/dal/sqliteDAL/IdentityDAL.ts @@ -329,7 +329,7 @@ export class IdentityDAL extends AbstractSQLite<DBIdentity> { } findByPub(pub: string) { - return this.sqlFind({pubkey: pub}); + return this.sqlFind({ pubkey: pub }); } async trimExpiredIdentities(medianTime: number) { diff --git a/app/modules/bma/lib/controllers/wot.ts b/app/modules/bma/lib/controllers/wot.ts index b5196aa51e1c530262129f071ffad887ebe50427..40686e297dd6d87f471c31d3a5c8d3aa4ed4532c 100644 --- a/app/modules/bma/lib/controllers/wot.ts +++ b/app/modules/bma/lib/controllers/wot.ts @@ -193,12 +193,11 @@ export class WOTBinding extends AbstractController { throw BMAConstants.ERRORS.NO_IDTY_MATCHING_PUB_OR_UID; } identities = await this.IdentityService.searchIdentitiesByPubkey(search); - } - else { + } else { identities = await this.IdentityService.searchIdentities(search); } const all: HttpIdentityRequirement[] = await this.BlockchainService.requirementsOfIdentities( - identities + identities ); if (!all || !all.length) { throw BMAConstants.ERRORS.NO_IDTY_MATCHING_PUB_OR_UID;