From f3329ecf062b217b2e062b92034152f623685a87 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 12 Dec 2019 22:39:45 +0100 Subject: refactor DB access --- src/operations/history.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/operations/history.ts') diff --git a/src/operations/history.ts b/src/operations/history.ts index 9c4bb6a90..b8d756cc6 100644 --- a/src/operations/history.ts +++ b/src/operations/history.ts @@ -17,7 +17,7 @@ /** * Imports. */ -import { oneShotIter, runWithReadTransaction } from "../util/query"; +import { Database } from "../util/query"; import { InternalWalletState } from "./state"; import { Stores, TipRecord } from "../types/dbTypes"; import * as Amounts from "../util/amounts"; @@ -38,8 +38,7 @@ export async function getHistory( // This works as timestamps are guaranteed to be monotonically // increasing even - await runWithReadTransaction( - ws.db, + await ws.db.runWithReadTransaction( [ Stores.currencies, Stores.coins, -- cgit v1.2.3