aboutsummaryrefslogtreecommitdiff
path: root/lib/wallet
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-03-02 05:23:16 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-03-02 05:23:16 +0100
commit18904a4a6d7b59f7baaddbe36f68288987a346b2 (patch)
treeac2b3ef8563267f2a634aa5db7eef25c6dedb4f4 /lib/wallet
parent7eba6a6c3b131934d5006f3afa66bbb34d0c3f83 (diff)
downloadwallet-core-18904a4a6d7b59f7baaddbe36f68288987a346b2.tar.xz
type error
Diffstat (limited to 'lib/wallet')
-rw-r--r--lib/wallet/wallet.ts5
1 files changed, 3 insertions, 2 deletions
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<any[]> {
+ getHistory(): Promise<any> {
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<CheckRepurchaseResult> {