From a75ef403acf80685c560aed09c544f0a272c666f Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 9 Apr 2018 00:41:14 +0200 Subject: make linter happy --- src/webex/compat.ts | 6 +++--- src/webex/pages/confirm-contract.tsx | 3 ++- src/webex/pages/confirm-create-reserve.tsx | 2 +- src/webex/pages/tip.tsx | 2 +- src/webex/wxApi.ts | 3 +++ src/webex/wxBackend.ts | 7 +++++-- 6 files changed, 15 insertions(+), 8 deletions(-) (limited to 'src/webex') diff --git a/src/webex/compat.ts b/src/webex/compat.ts index 30ffd4a81..65ddfab4a 100644 --- a/src/webex/compat.ts +++ b/src/webex/compat.ts @@ -15,9 +15,9 @@ */ /** -* Compatibility helpers needed for browsers that don't implement -* WebExtension APIs consistently. -*/ + * Compatibility helpers needed for browsers that don't implement + * WebExtension APIs consistently. + */ export function isFirefox(): boolean { const rt = chrome.runtime as any; diff --git a/src/webex/pages/confirm-contract.tsx b/src/webex/pages/confirm-contract.tsx index f1e98f22b..41eebda8e 100644 --- a/src/webex/pages/confirm-contract.tsx +++ b/src/webex/pages/confirm-contract.tsx @@ -379,7 +379,8 @@ class ContractPrompt extends React.Component - The total price is {amount} (plus {renderAmount(this.state.payStatus.coinSelection.totalFees)} fees). + The total price is {amount} + (plus {renderAmount(this.state.payStatus.coinSelection.totalFees)} fees). : The total price is {amount}. diff --git a/src/webex/pages/confirm-create-reserve.tsx b/src/webex/pages/confirm-create-reserve.tsx index 5be6fe351..cef647163 100644 --- a/src/webex/pages/confirm-create-reserve.tsx +++ b/src/webex/pages/confirm-create-reserve.tsx @@ -340,7 +340,7 @@ class ExchangeSelection extends ImplicitStateComponent { )} diff --git a/src/webex/pages/tip.tsx b/src/webex/pages/tip.tsx index 6fbb3005d..c13120c43 100644 --- a/src/webex/pages/tip.tsx +++ b/src/webex/pages/tip.tsx @@ -30,8 +30,8 @@ import * as i18n from "../../i18n"; import { acceptTip, - getTipStatus, getReserveCreationInfo, + getTipStatus, } from "../wxApi"; import { diff --git a/src/webex/wxApi.ts b/src/webex/wxApi.ts index 32788d37b..e5da642f1 100644 --- a/src/webex/wxApi.ts +++ b/src/webex/wxApi.ts @@ -72,6 +72,9 @@ export interface UpgradeResponse { } +/** + * Error thrown when the function from the backend (via RPC) threw an error. + */ export class WalletApiError extends Error { constructor(message: string, public detail: any) { super(message); diff --git a/src/webex/wxBackend.ts b/src/webex/wxBackend.ts index 0b4f0976e..b1aecbbdd 100644 --- a/src/webex/wxBackend.ts +++ b/src/webex/wxBackend.ts @@ -475,7 +475,10 @@ function waitMs(timeoutMs: number): Promise { } -function makeSyncWalletRedirect(url: string, tabId: number, oldUrl: string, params?: {[name: string]: string | undefined}): object { +function makeSyncWalletRedirect(url: string, + tabId: number, + oldUrl: string, + params?: {[name: string]: string | undefined}): object { const innerUrl = new URI(chrome.extension.getURL("/src/webex/pages/" + url)); if (params) { for (const key in params) { @@ -552,8 +555,8 @@ function handleHttpPayment(headerList: chrome.webRequest.HttpHeader[], url: stri if (fields.contract_url) { return makeSyncWalletRedirect("confirm-contract.html", tabId, url, { contractUrl: fields.contract_url, - sessionId: fields.session_id, resourceUrl: fields.resource_url, + sessionId: fields.session_id, }); } -- cgit v1.2.3