aboutsummaryrefslogtreecommitdiff
path: root/src/webex
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-04-06 21:15:41 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-04-06 21:15:41 +0530
commitf36bb7a04eabe0330cb166bf9ce5021c92f38dc8 (patch)
tree9a242a06bd5353c8b167600c31776c9f16d9d21c /src/webex
parent07f25566ca51b7faf6462a57d15f4ebbfc733ab0 (diff)
downloadwallet-core-f36bb7a04eabe0330cb166bf9ce5021c92f38dc8.tar.xz
linter
Diffstat (limited to 'src/webex')
-rw-r--r--src/webex/chromeBadge.ts8
-rw-r--r--src/webex/i18n.tsx2
-rw-r--r--src/webex/notify.ts4
-rw-r--r--src/webex/pages/benchmark.tsx2
-rw-r--r--src/webex/pages/popup.tsx6
-rw-r--r--src/webex/renderHtml.tsx2
-rw-r--r--src/webex/wxBackend.ts4
7 files changed, 14 insertions, 14 deletions
diff --git a/src/webex/chromeBadge.ts b/src/webex/chromeBadge.ts
index cdd99f8c1..330388ca0 100644
--- a/src/webex/chromeBadge.ts
+++ b/src/webex/chromeBadge.ts
@@ -38,25 +38,25 @@ export class ChromeBadge {
* might still be running even if we're not busy anymore,
* just to transition to the "normal" state in a animated way.
*/
- private animationRunning: boolean = false;
+ private animationRunning = false;
/**
* Is the wallet still busy? Note that we do not stop the
* animation immediately when the wallet goes idle, but
* instead slowly close the gap.
*/
- private isBusy: boolean = false;
+ private isBusy = false;
/**
* Current rotation angle, ranges from 0 to rotationAngleMax.
*/
- private rotationAngle: number = 0;
+ private rotationAngle = 0;
/**
* While animating, how wide is the current gap in the circle?
* Ranges from 0 to openMax.
*/
- private gapWidth: number = 0;
+ private gapWidth = 0;
/**
* Should we show the notification dot?
diff --git a/src/webex/i18n.tsx b/src/webex/i18n.tsx
index a156cf834..ed6fe868f 100644
--- a/src/webex/i18n.tsx
+++ b/src/webex/i18n.tsx
@@ -30,7 +30,7 @@ import * as React from "react";
const jed = setupJed();
-let enableTracing = false;
+const enableTracing = false;
/**
* Set up jed library for internationalization,
diff --git a/src/webex/notify.ts b/src/webex/notify.ts
index d76d121a0..887658ef9 100644
--- a/src/webex/notify.ts
+++ b/src/webex/notify.ts
@@ -26,9 +26,9 @@
*/
import * as wxApi from "./wxApi";
-declare var cloneInto: any;
+declare let cloneInto: any;
-let logVerbose: boolean = false;
+let logVerbose = false;
try {
logVerbose = !!localStorage.getItem("taler-log-verbose");
} catch (e) {
diff --git a/src/webex/pages/benchmark.tsx b/src/webex/pages/benchmark.tsx
index 1efe7898d..bf4c4b04d 100644
--- a/src/webex/pages/benchmark.tsx
+++ b/src/webex/pages/benchmark.tsx
@@ -77,7 +77,7 @@ class BenchmarkRunner extends React.Component<any, BenchmarkRunnerState> {
async run() {
this.setState({ result: undefined, running: true });
- let result = await wxApi.benchmarkCrypto(this.state.repetitions);
+ const result = await wxApi.benchmarkCrypto(this.state.repetitions);
this.setState({ result, running: false });
}
diff --git a/src/webex/pages/popup.tsx b/src/webex/pages/popup.tsx
index f4a2bf568..6cd7242ff 100644
--- a/src/webex/pages/popup.tsx
+++ b/src/webex/pages/popup.tsx
@@ -427,8 +427,8 @@ function amountDiff(
total: string | Amounts.AmountJson,
partial: string | Amounts.AmountJson,
): Amounts.AmountJson | string {
- let a = typeof total === "string" ? Amounts.parse(total) : total;
- let b = typeof partial === "string" ? Amounts.parse(partial) : partial;
+ const a = typeof total === "string" ? Amounts.parse(total) : total;
+ const b = typeof partial === "string" ? Amounts.parse(partial) : partial;
if (a && b) {
return Amounts.sub(a, b).amount;
} else {
@@ -437,7 +437,7 @@ function amountDiff(
}
function parseSummary(summary: string) {
- let parsed = summary.split(/: (.+)/);
+ const parsed = summary.split(/: (.+)/);
return {
merchant: parsed[0],
item: parsed[1],
diff --git a/src/webex/renderHtml.tsx b/src/webex/renderHtml.tsx
index 082dd84dd..b6ff1248c 100644
--- a/src/webex/renderHtml.tsx
+++ b/src/webex/renderHtml.tsx
@@ -61,7 +61,7 @@ export const AmountView = ({ amount }: { amount: AmountJson | string }) =>
* Abbreviate a string to a given length, and show the full
* string on hover as a tooltip.
*/
-export function abbrev(s: string, n: number = 5) {
+export function abbrev(s: string, n = 5) {
let sAbbrev = s;
if (s.length > n) {
sAbbrev = s.slice(0, n) + "..";
diff --git a/src/webex/wxBackend.ts b/src/webex/wxBackend.ts
index 4c9a76556..ef4715dce 100644
--- a/src/webex/wxBackend.ts
+++ b/src/webex/wxBackend.ts
@@ -384,7 +384,7 @@ let currentDatabase: IDBDatabase | undefined;
*/
let outdatedDbVersion: number | undefined;
-let walletInit: OpenedPromise<void> = openPromise<void>();
+const walletInit: OpenedPromise<void> = openPromise<void>();
async function reinitWallet() {
if (currentWallet) {
@@ -571,7 +571,7 @@ export async function wxMain() {
}
if (details.statusCode === 402 || details.statusCode === 202) {
console.log(`got 402/202 from ${details.url}`);
- for (let header of details.responseHeaders || []) {
+ for (const header of details.responseHeaders || []) {
if (header.name.toLowerCase() === "taler") {
const talerUri = header.value || "";
const uriType = classifyTalerUri(talerUri);