aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-09-14 15:55:10 +0200
committerFlorian Dold <florian.dold@gmail.com>2016-09-14 15:55:10 +0200
commitebbdadb4b6bd59e57b0eec8e280c7c5c12453167 (patch)
tree8f9fdbd1cf0e2d1b79884dfe15828f3c98f28da6 /pages
parentfc6db1824e6974898f177ffb0ffd2eb138a653ce (diff)
downloadwallet-core-ebbdadb4b6bd59e57b0eec8e280c7c5c12453167.tar.xz
sort out libs / fix warnings
Diffstat (limited to 'pages')
-rw-r--r--pages/confirm-contract.tsx2
-rw-r--r--pages/confirm-create-reserve.tsx6
-rw-r--r--pages/show-db.ts6
3 files changed, 9 insertions, 5 deletions
diff --git a/pages/confirm-contract.tsx b/pages/confirm-contract.tsx
index e88336a2d..19b049eb5 100644
--- a/pages/confirm-contract.tsx
+++ b/pages/confirm-contract.tsx
@@ -95,7 +95,7 @@ export function main() {
}
};
- m.mount(document.getElementById("contract"), Contract);
+ m.mount(document.getElementById("contract")!, Contract);
function checkPayment() {
chrome.runtime.sendMessage({type: 'check-pay', detail: {offer}}, (resp) => {
diff --git a/pages/confirm-create-reserve.tsx b/pages/confirm-create-reserve.tsx
index 667323044..0a509118d 100644
--- a/pages/confirm-create-reserve.tsx
+++ b/pages/confirm-create-reserve.tsx
@@ -189,7 +189,7 @@ class Controller {
}
function view(ctrl: Controller): any {
- function* f() {
+ function* f(): IterableIterator<any> {
yield m("p",
i18n.parts`You are about to withdraw ${m("strong", amountToPretty(
ctrl.amount))} from your bank account into your wallet.`);
@@ -374,8 +374,8 @@ export function main() {
getSuggestedExchange(amount.currency)
.then((suggestedExchangeUrl) => {
const controller = function () { return new Controller(suggestedExchangeUrl, amount, callback_url, wt_types); };
- var ExchangeSelection = {controller, view};
- m.mount(document.getElementById("exchange-selection"), ExchangeSelection);
+ const ExchangeSelection = {controller, view};
+ m.mount(document.getElementById("exchange-selection")!, ExchangeSelection);
})
.catch((e) => {
// TODO: provide more context information, maybe factor it out into a
diff --git a/pages/show-db.ts b/pages/show-db.ts
index 0a3a5bd46..71e74388b 100644
--- a/pages/show-db.ts
+++ b/pages/show-db.ts
@@ -48,6 +48,10 @@ function prettyPrint(obj: any) {
document.addEventListener("DOMContentLoaded", () => {
chrome.runtime.sendMessage({type: 'dump-db'}, (resp) => {
- document.getElementById('dump').innerHTML = prettyPrint(resp);
+ const el = document.getElementById('dump');
+ if (!el) {
+ throw Error();
+ }
+ el.innerHTML = prettyPrint(resp);
});
});