summaryrefslogtreecommitdiff
path: root/src/operations/history.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/operations/history.ts')
-rw-r--r--src/operations/history.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/operations/history.ts b/src/operations/history.ts
index 669a6cf85..1271c56ef 100644
--- a/src/operations/history.ts
+++ b/src/operations/history.ts
@@ -172,6 +172,7 @@ export async function getHistory(
Stores.purchases,
Stores.refreshGroups,
Stores.reserves,
+ Stores.reserveHistory,
Stores.tips,
Stores.withdrawalGroups,
Stores.payEvents,
@@ -384,8 +385,12 @@ export async function getHistory(
type: ReserveType.Manual,
};
}
+ const hist = await tx.get(Stores.reserveHistory, reserve.reservePub);
+ if (!hist) {
+ throw Error("inconsistent database");
+ }
const s = summarizeReserveHistory(
- reserve.reserveTransactions,
+ hist.reserveTransactions,
reserve.currency,
);
history.push({