aboutsummaryrefslogtreecommitdiff
path: root/src/operations/balance.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-05-11 21:47:35 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-05-11 21:47:35 +0530
commit857a2b9dcaf64d4298027644f8e6716fa22db941 (patch)
treedc711c998d153a5f3169e71c851adbf5d7ad12ec /src/operations/balance.ts
parent277a513a8f9c46392446514e7a37e77e4f4b5327 (diff)
downloadwallet-core-857a2b9dcaf64d4298027644f8e6716fa22db941.tar.xz
perf: reserve history in separate object store
Diffstat (limited to 'src/operations/balance.ts')
-rw-r--r--src/operations/balance.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/operations/balance.ts b/src/operations/balance.ts
index b5c1ec79e..6f9135028 100644
--- a/src/operations/balance.ts
+++ b/src/operations/balance.ts
@@ -145,7 +145,7 @@ export async function getBalances(
): Promise<WalletBalance> {
logger.trace("starting to compute balance");
- return await ws.db.runWithReadTransaction(
+ const wbal = await ws.db.runWithReadTransaction(
[
Stores.coins,
Stores.refreshGroups,
@@ -157,4 +157,8 @@ export async function getBalances(
return getBalancesInsideTransaction(ws, tx);
},
);
+
+ logger.trace("finished computing wallet balance");
+
+ return wbal;
}