aboutsummaryrefslogtreecommitdiff
path: root/lib/wallet/wallet.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wallet/wallet.ts')
-rw-r--r--lib/wallet/wallet.ts7
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)