aboutsummaryrefslogtreecommitdiff
path: root/src/webex
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-04-09 00:41:14 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-04-09 00:41:14 +0200
commita75ef403acf80685c560aed09c544f0a272c666f (patch)
treebcfae61fe2c03beac71dbc6fc8b10b2f4f2b7393 /src/webex
parent6533716fac07e4988ef94231a0c0c8aba68e0d5e (diff)
downloadwallet-core-a75ef403acf80685c560aed09c544f0a272c666f.tar.xz
make linter happy
Diffstat (limited to 'src/webex')
-rw-r--r--src/webex/compat.ts6
-rw-r--r--src/webex/pages/confirm-contract.tsx3
-rw-r--r--src/webex/pages/confirm-create-reserve.tsx2
-rw-r--r--src/webex/pages/tip.tsx2
-rw-r--r--src/webex/wxApi.ts3
-rw-r--r--src/webex/wxBackend.ts7
6 files changed, 15 insertions, 8 deletions
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<ContractPromptProps, ContractPrompt
{products}
{(this.state.payStatus && this.state.payStatus.coinSelection)
? <i18n.Translate wrap="p">
- The total price is <span>{amount} </span> (plus <span>{renderAmount(this.state.payStatus.coinSelection.totalFees)}</span> fees).
+ The total price is <span>{amount} </span>
+ (plus <span>{renderAmount(this.state.payStatus.coinSelection.totalFees)}</span> fees).
</i18n.Translate>
:
<i18n.Translate wrap="p">The total price is <span>{amount}</span>.</i18n.Translate>
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<ExchangeSelectionProps> {
<button className="pure-button button-success" onClick={() => this.select(this.props.suggestedExchangeUrl)}>
<i18n.Translate wrap="span">
Select <strong>{this.props.suggestedExchangeUrl}</strong>
- </i18n.Translate>
+ </i18n.Translate>
</button>
</div>
)}
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<void> {
}
-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,
});
}