summaryrefslogtreecommitdiff
path: root/src/webex
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-04-07 13:58:55 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-04-07 13:58:55 +0530
commitfaba5e9db8e0d1fdc4845de6b504b4e2ea3ca72b (patch)
tree53bbc26d9e5d16e168e682ce808461a395e00f45 /src/webex
parentfb2e2f89935240666de66e4b2c11125cb3b2943d (diff)
downloadwallet-core-faba5e9db8e0d1fdc4845de6b504b4e2ea3ca72b.tar.gz
wallet-core-faba5e9db8e0d1fdc4845de6b504b4e2ea3ca72b.tar.bz2
wallet-core-faba5e9db8e0d1fdc4845de6b504b4e2ea3ca72b.zip
finally make linter happy
Diffstat (limited to 'src/webex')
-rw-r--r--src/webex/i18n.tsx6
-rw-r--r--src/webex/messages.ts1
-rw-r--r--src/webex/pages/popup.tsx7
3 files changed, 8 insertions, 6 deletions
diff --git a/src/webex/i18n.tsx b/src/webex/i18n.tsx
index 3f23267d5..4c111a05a 100644
--- a/src/webex/i18n.tsx
+++ b/src/webex/i18n.tsx
@@ -129,7 +129,7 @@ export class Translate extends React.Component<TranslateProps, {}> {
.ngettext(s, s, 1)
.split(/%(\d+)\$s/)
.filter((e: any, i: number) => i % 2 === 0);
- const childArray = React.Children.toArray(this.props.children!);
+ const childArray = React.Children.toArray(this.props.children);
for (let i = 0; i < childArray.length - 1; ++i) {
if (
typeof childArray[i] === "string" &&
@@ -220,7 +220,7 @@ export class TranslatePlural extends React.Component<
.ngettext(s, s, 1)
.split(/%(\d+)\$s/)
.filter((e: any, i: number) => i % 2 === 0);
- const childArray = React.Children.toArray(this.props.children!);
+ const childArray = React.Children.toArray(this.props.children);
for (let i = 0; i < childArray.length - 1; ++i) {
if (
typeof childArray[i] === "string" &&
@@ -261,7 +261,7 @@ export class TranslateSingular extends React.Component<
.ngettext(s, s, 1)
.split(/%(\d+)\$s/)
.filter((e: any, i: number) => i % 2 === 0);
- const childArray = React.Children.toArray(this.props.children!);
+ const childArray = React.Children.toArray(this.props.children);
for (let i = 0; i < childArray.length - 1; ++i) {
if (
typeof childArray[i] === "string" &&
diff --git a/src/webex/messages.ts b/src/webex/messages.ts
index 19d125a89..745e309c7 100644
--- a/src/webex/messages.ts
+++ b/src/webex/messages.ts
@@ -170,4 +170,3 @@ export interface MessageMap {
* String literal types for messages.
*/
export type MessageType = keyof MessageMap;
-
diff --git a/src/webex/pages/popup.tsx b/src/webex/pages/popup.tsx
index cdb09d444..0fd2477f6 100644
--- a/src/webex/pages/popup.tsx
+++ b/src/webex/pages/popup.tsx
@@ -40,6 +40,9 @@ import { HistoryEvent } from "../../types/history";
import moment from "moment";
import { Timestamp } from "../../util/time";
+// FIXME: move to newer react functions
+/* eslint-disable react/no-deprecated */
+
function onUpdateNotification(f: () => void): () => void {
const port = chrome.runtime.connect({ name: "notifications" });
const listener = (): void => {
@@ -290,7 +293,7 @@ class WalletBalanceView extends React.Component<any, any> {
const listing = Object.keys(wallet.byCurrency).map((key) => {
const entry: WalletBalanceEntry = wallet.byCurrency[key];
return (
- <p>
+ <p key={key}>
{bigAmount(entry.available)} {this.formatPending(entry)}
</p>
);
@@ -414,7 +417,7 @@ function amountDiff(
}
}
-function parseSummary(summary: string) {
+function parseSummary(summary: string): { item: string; merchant: string } {
const parsed = summary.split(/: (.+)/);
return {
merchant: parsed[0],