diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-13 10:17:39 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-13 10:17:39 +0100 |
commit | eb84d5747aac0de781d64fb9cdbf2da13006d85e (patch) | |
tree | 387d7711e177d151a185e2a9a870c39cc03926ce /lib/wallet/wxMessaging.ts | |
parent | b2128609ac8159a14224deba399144b3400c8c20 (diff) | |
download | wallet-core-eb84d5747aac0de781d64fb9cdbf2da13006d85e.tar.xz |
fix small react issues
Diffstat (limited to 'lib/wallet/wxMessaging.ts')
-rw-r--r-- | lib/wallet/wxMessaging.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/wallet/wxMessaging.ts b/lib/wallet/wxMessaging.ts index 1c3876772..07f16f24f 100644 --- a/lib/wallet/wxMessaging.ts +++ b/lib/wallet/wxMessaging.ts @@ -168,6 +168,14 @@ function makeHandlers(db: IDBDatabase, } return wallet.putHistory(detail.historyEntry); }, + ["save-offer"]: function (detail: any) { + let offer = detail.offer; + if (!offer) { + return Promise.resolve({ error: "offer missing" }); + } + console.log("handling safe-offer"); + return wallet.saveOffer(offer); + }, ["reserve-creation-info"]: function (detail, sender) { if (!detail.baseUrl || typeof detail.baseUrl !== "string") { return Promise.resolve({ error: "bad url" }); @@ -183,6 +191,9 @@ function makeHandlers(db: IDBDatabase, // TODO: limit history length return wallet.getHistory(); }, + ["get-offer"]: function (detail, sender) { + return wallet.getOffer(detail.offerId); + }, ["get-exchanges"]: function (detail, sender) { return wallet.getExchanges(); }, |