diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-01 04:05:16 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-01 04:05:16 +0200 |
commit | 4c03a1200eb947a0ed13f78b46fd670601b8cb80 (patch) | |
tree | 16c64421a72000ab19f939ffe492519b013fbafc /src/wxBackend.ts | |
parent | bb6d8317a5ff672fccdb0a35e55077521827a48d (diff) |
implement payback (with rudimentary UI)
Diffstat (limited to 'src/wxBackend.ts')
-rw-r--r-- | src/wxBackend.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/wxBackend.ts b/src/wxBackend.ts index 716dc66be..1588ec857 100644 --- a/src/wxBackend.ts +++ b/src/wxBackend.ts @@ -36,7 +36,7 @@ import URI = require("urijs"); "use strict"; const DB_NAME = "taler"; -const DB_VERSION = 16; +const DB_VERSION = 17; import {Stores} from "./wallet"; import {Store, Index} from "./query"; @@ -226,6 +226,15 @@ function makeHandlers(db: IDBDatabase, } return wallet.getReserves(detail.exchangeBaseUrl); }, + ["get-payback-reserves"]: function (detail, sender) { + return wallet.getPaybackReserves(); + }, + ["withdraw-payback-reserve"]: function (detail, sender) { + if (typeof detail.reservePub !== "string") { + return Promise.reject(Error("reservePub missing")); + } + return wallet.withdrawPaybackReserve(detail.reservePub); + }, ["get-coins"]: function (detail, sender) { if (typeof detail.exchangeBaseUrl !== "string") { return Promise.reject(Error("exchangBaseUrl missing")); |