diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-09-28 23:41:34 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-09-28 23:41:34 +0200 |
commit | 274204c21e421ed13c66411ce56bb70dea03d410 (patch) | |
tree | 44f96996f5631526e96866fe583de2ca87ec2898 /lib/wallet/wxMessaging.ts | |
parent | 29909a27f592ac1bca98bfe7058b576167445518 (diff) | |
download | wallet-core-274204c21e421ed13c66411ce56bb70dea03d410.tar.xz |
check contract hash, fix unicode bug
Diffstat (limited to 'lib/wallet/wxMessaging.ts')
-rw-r--r-- | lib/wallet/wxMessaging.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/wallet/wxMessaging.ts b/lib/wallet/wxMessaging.ts index be0e09de7..5c97248c4 100644 --- a/lib/wallet/wxMessaging.ts +++ b/lib/wallet/wxMessaging.ts @@ -151,6 +151,20 @@ function makeHandlers(db: IDBDatabase, } return wallet.updateExchangeFromUrl(detail.baseUrl); }, + ["hash-contract"]: function(detail) { + if (!detail.contract) { + return Promise.resolve({error: "contract missing"}); + } + return wallet.hashContract(detail.contract).then((hash) => { + return {hash}; + }); + }, + ["put-history-entry"]: function(detail: any) { + if (!detail.historyEntry) { + return Promise.resolve({error: "historyEntry missing"}); + } + return wallet.putHistory(detail.historyEntry); + }, ["reserve-creation-info"]: function(detail, sender) { if (!detail.baseUrl || typeof detail.baseUrl !== "string") { return Promise.resolve({error: "bad url"}); |