From 7c03db9ba0fcbf10da8fc37ff55b6d987aab8541 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 2 Mar 2016 00:47:00 +0100 Subject: db versioning --- lib/wallet/wallet.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/wallet/wallet.ts') diff --git a/lib/wallet/wallet.ts b/lib/wallet/wallet.ts index 94ac8ee8a..3764edfbc 100644 --- a/lib/wallet/wallet.ts +++ b/lib/wallet/wallet.ts @@ -912,7 +912,10 @@ export class Wallet { return Query(this.db) .iter("coins") - .reduce(collectBalances, {}); + .reduce(collectBalances, {}) + .then(byCurrency => { + return {balances: byCurrency}; + }); } @@ -922,7 +925,7 @@ export class Wallet { getHistory(): Promise { function collect(x, acc) { acc.push(x); - return acc; + return {history: acc}; } return Query(this.db) -- cgit v1.2.3