summaryrefslogtreecommitdiff
path: root/src/operations/refresh.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-04-07 13:37:32 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-04-07 13:37:32 +0530
commitfb2e2f89935240666de66e4b2c11125cb3b2943d (patch)
tree7b7e148e6cce7bf7639a5e35102f5269f5920ab5 /src/operations/refresh.ts
parent1471aae8927c20d646cc2aa5ab0e20c1a7f2c0ca (diff)
downloadwallet-core-fb2e2f89935240666de66e4b2c11125cb3b2943d.tar.gz
wallet-core-fb2e2f89935240666de66e4b2c11125cb3b2943d.tar.bz2
wallet-core-fb2e2f89935240666de66e4b2c11125cb3b2943d.zip
more lint fixes
Diffstat (limited to 'src/operations/refresh.ts')
-rw-r--r--src/operations/refresh.ts13
1 files changed, 6 insertions, 7 deletions
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<void> {
await ws.memoProcessRefresh.memo(refreshGroupId, async () => {
- const onOpErr = (e: OperationError) =>
+ const onOpErr = (e: OperationError): Promise<void> =>
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<void> {
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<void> {
if (forceNow) {
await resetRefreshGroupRetry(ws, refreshGroupId);
}
@@ -532,7 +531,7 @@ async function processRefreshSession(
ws: InternalWalletState,
refreshGroupId: string,
coinIndex: number,
-) {
+): Promise<void> {
logger.trace(
`processing refresh session for coin ${coinIndex} of group ${refreshGroupId}`,
);