diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-03-02 00:47:00 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-03-02 00:49:10 +0100 |
commit | 7c03db9ba0fcbf10da8fc37ff55b6d987aab8541 (patch) | |
tree | 396ad80cf28680ff1fe21a9fb60ec4b190899464 /lib/wallet/wallet.ts | |
parent | ff3cea6b64704af2af824b074eadd32a00d2e72e (diff) | |
download | wallet-core-7c03db9ba0fcbf10da8fc37ff55b6d987aab8541.tar.xz |
db versioning
Diffstat (limited to 'lib/wallet/wallet.ts')
-rw-r--r-- | lib/wallet/wallet.ts | 7 |
1 files changed, 5 insertions, 2 deletions
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<any[]> { function collect(x, acc) { acc.push(x); - return acc; + return {history: acc}; } return Query(this.db) |