From 18904a4a6d7b59f7baaddbe36f68288987a346b2 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 2 Mar 2016 05:23:16 +0100 Subject: type error --- lib/wallet/wallet.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/wallet/wallet.ts b/lib/wallet/wallet.ts index 0dc232bb0..8291f653a 100644 --- a/lib/wallet/wallet.ts +++ b/lib/wallet/wallet.ts @@ -862,15 +862,16 @@ export class Wallet { /** * Retrive the full event history for this wallet. */ - getHistory(): Promise { + getHistory(): Promise { function collect(x, acc) { acc.push(x); - return {history: acc}; + return acc; } return Query(this.db) .iter("history", {indexName: "timestamp"}) .reduce(collect, []) + .then(acc => ({history: acc})); } checkRepurchase(contract: Contract): Promise { -- cgit v1.2.3