From fb2e2f89935240666de66e4b2c11125cb3b2943d Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 7 Apr 2020 13:37:32 +0530 Subject: more lint fixes --- src/operations/refresh.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/operations/refresh.ts') diff --git a/src/operations/refresh.ts b/src/operations/refresh.ts index 23d192e0a..924769334 100644 --- a/src/operations/refresh.ts +++ b/src/operations/refresh.ts @@ -28,7 +28,7 @@ import { CoinSourceType, } from "../types/dbTypes"; import { amountToPretty } from "../util/helpers"; -import { Database, TransactionHandle } from "../util/query"; +import { TransactionHandle } from "../util/query"; import { InternalWalletState } from "./state"; import { Logger } from "../util/logging"; import { getWithdrawDenomList } from "./withdraw"; @@ -390,8 +390,7 @@ async function refreshReveal( console.error("denom not found"); continue; } - const pc = - refreshSession.planchetsForGammas[refreshSession.norevealIndex!][i]; + const pc = refreshSession.planchetsForGammas[norevealIndex][i]; const denomSig = await ws.cryptoApi.rsaUnblind( respJson.ev_sigs[i].ev_sig, pc.blindingKey, @@ -485,7 +484,7 @@ export async function processRefreshGroup( forceNow = false, ): Promise { await ws.memoProcessRefresh.memo(refreshGroupId, async () => { - const onOpErr = (e: OperationError) => + const onOpErr = (e: OperationError): Promise => incrementRefreshRetry(ws, refreshGroupId, e); return await guardOperationException( async () => await processRefreshGroupImpl(ws, refreshGroupId, forceNow), @@ -497,7 +496,7 @@ export async function processRefreshGroup( async function resetRefreshGroupRetry( ws: InternalWalletState, refreshSessionId: string, -) { +): Promise { await ws.db.mutate(Stores.refreshGroups, refreshSessionId, (x) => { if (x.retryInfo.active) { x.retryInfo = initRetryInfo(); @@ -510,7 +509,7 @@ async function processRefreshGroupImpl( ws: InternalWalletState, refreshGroupId: string, forceNow: boolean, -) { +): Promise { if (forceNow) { await resetRefreshGroupRetry(ws, refreshGroupId); } @@ -532,7 +531,7 @@ async function processRefreshSession( ws: InternalWalletState, refreshGroupId: string, coinIndex: number, -) { +): Promise { logger.trace( `processing refresh session for coin ${coinIndex} of group ${refreshGroupId}`, ); -- cgit v1.2.3