diff options
Diffstat (limited to 'src/webex/pages')
-rw-r--r-- | src/webex/pages/add-auditor.tsx | 8 | ||||
-rw-r--r-- | src/webex/pages/auditors.tsx | 8 | ||||
-rw-r--r-- | src/webex/pages/confirm-contract.tsx | 1 | ||||
-rw-r--r-- | src/webex/pages/confirm-create-reserve.tsx | 14 | ||||
-rw-r--r-- | src/webex/pages/error.tsx | 4 | ||||
-rw-r--r-- | src/webex/pages/payback.tsx | 13 | ||||
-rw-r--r-- | src/webex/pages/popup.tsx | 4 | ||||
-rw-r--r-- | src/webex/pages/tree.tsx | 1 |
8 files changed, 4 insertions, 49 deletions
diff --git a/src/webex/pages/add-auditor.tsx b/src/webex/pages/add-auditor.tsx index 72e800192..dbe761a5f 100644 --- a/src/webex/pages/add-auditor.tsx +++ b/src/webex/pages/add-auditor.tsx @@ -21,16 +21,8 @@ */ -import { getTalerStampDate } from "../../helpers"; import { - AuditorRecord, - CoinRecord, CurrencyRecord, - Denomination, - DenominationRecord, - ExchangeRecord, - PreCoinRecord, - ReserveRecord, } from "../../types"; import { ImplicitStateComponent, StateHolder } from "../components"; diff --git a/src/webex/pages/auditors.tsx b/src/webex/pages/auditors.tsx index 7c6a3aff1..8850cdd87 100644 --- a/src/webex/pages/auditors.tsx +++ b/src/webex/pages/auditors.tsx @@ -21,20 +21,12 @@ */ -import { getTalerStampDate } from "../../helpers"; import { AuditorRecord, - CoinRecord, CurrencyRecord, - Denomination, - DenominationRecord, ExchangeForCurrencyRecord, - ExchangeRecord, - PreCoinRecord, - ReserveRecord, } from "../../types"; -import { ImplicitStateComponent, StateHolder } from "../components"; import { getCurrencies, updateCurrency, diff --git a/src/webex/pages/confirm-contract.tsx b/src/webex/pages/confirm-contract.tsx index dc7bd46af..9b4c93334 100644 --- a/src/webex/pages/confirm-contract.tsx +++ b/src/webex/pages/confirm-contract.tsx @@ -25,7 +25,6 @@ */ import * as i18n from "../../i18n"; import { - AmountJson, Contract, ExchangeRecord, OfferRecord, diff --git a/src/webex/pages/confirm-create-reserve.tsx b/src/webex/pages/confirm-create-reserve.tsx index 50a1045ef..6e1cc4a82 100644 --- a/src/webex/pages/confirm-create-reserve.tsx +++ b/src/webex/pages/confirm-create-reserve.tsx @@ -29,7 +29,6 @@ import { Amounts, CreateReserveResponse, CurrencyRecord, - Denomination, DenominationRecord, ReserveCreationInfo, } from "../../types"; @@ -229,16 +228,6 @@ function renderReserveCreationDetails(rci: ReserveCreationInfo|null) { } -function WithdrawFee(props: {reserveCreationInfo: ReserveCreationInfo|null}): JSX.Element { - if (props.reserveCreationInfo) { - const {overhead, withdrawFee} = props.reserveCreationInfo; - const totalCost = Amounts.add(overhead, withdrawFee).amount; - return <p>{i18n.str`Withdraw fees:`} {amountToPretty(totalCost)}</p>; - } - return <p />; -} - - interface ExchangeSelectionProps { suggestedExchangeUrl: string; amount: AmountJson; @@ -298,7 +287,7 @@ class ManualSelection extends ImplicitStateComponent<ManualSelectionProps> { } try { const url = canonicalizeBaseUrl(this.url()!); - const r = await getExchangeInfo(url); + await getExchangeInfo(url); console.log("getExchangeInfo returned"); this.isOkay(true); } catch (e) { @@ -596,7 +585,6 @@ async function main() { throw Error(i18n.str`Can't parse amount: ${e.message}`); } const callback_url = query.callback_url; - const bank_url = query.bank_url; let wt_types; try { wt_types = JSON.parse(query.wt_types); diff --git a/src/webex/pages/error.tsx b/src/webex/pages/error.tsx index 829ea0c90..75ba990b4 100644 --- a/src/webex/pages/error.tsx +++ b/src/webex/pages/error.tsx @@ -22,8 +22,6 @@ * @author Florian Dold */ -import {ImplicitStateComponent, StateHolder} from "../components"; - import * as React from "react"; import * as ReactDOM from "react-dom"; import URI = require("urijs"); @@ -59,3 +57,5 @@ async function main() { console.error(`got error "${e.message}"`, e); } } + +document.addEventListener("DOMContentLoaded", () => main()); diff --git a/src/webex/pages/payback.tsx b/src/webex/pages/payback.tsx index e10da7b05..4aadf5add 100644 --- a/src/webex/pages/payback.tsx +++ b/src/webex/pages/payback.tsx @@ -24,25 +24,14 @@ /** * Imports. */ -import { amountToPretty, getTalerStampDate } from "../../helpers"; +import { amountToPretty } from "../../helpers"; import { - AuditorRecord, - CoinRecord, - CurrencyRecord, - Denomination, - DenominationRecord, - ExchangeForCurrencyRecord, - ExchangeRecord, - PreCoinRecord, ReserveRecord, - WalletBalance, } from "../../types"; import { ImplicitStateComponent, StateHolder } from "../components"; import { - getCurrencies, getPaybackReserves, - updateCurrency, withdrawPaybackReserve, } from "../wxApi"; diff --git a/src/webex/pages/popup.tsx b/src/webex/pages/popup.tsx index a1a3f6b2b..c62a6f8af 100644 --- a/src/webex/pages/popup.tsx +++ b/src/webex/pages/popup.tsx @@ -325,7 +325,6 @@ class WalletBalanceView extends React.Component<any, any> { }); const link = chrome.extension.getURL("/src/webex/pages/auditors.html"); const linkElem = <a className="actionLink" href={link} target="_blank">Trusted Auditors and Exchanges</a>; - const paybackLink = chrome.extension.getURL("/src/webex/pages/payback.html"); const paybackLinkElem = <a className="actionLink" href={link} target="_blank">Trusted Auditors and Exchanges</a>; return ( <div> @@ -340,7 +339,6 @@ class WalletBalanceView extends React.Component<any, any> { function formatHistoryItem(historyItem: HistoryRecord) { const d = historyItem.detail; - const t = historyItem.timestamp; console.log("hist item", historyItem); switch (historyItem.type) { case "create-reserve": @@ -365,8 +363,6 @@ function formatHistoryItem(historyItem: HistoryRecord) { } case "offer-contract": { const link = chrome.extension.getURL("view-contract.html"); - const linkElem = <a href={link}>{abbrev(d.contractHash)}</a>; - const merchantElem = <em>{abbrev(d.merchantName, 15)}</em>; return ( <i18n.Translate wrap="p"> Merchant <em>{abbrev(d.merchantName, 15)}</em> offered contract <a href={link}>{abbrev(d.contractHash)}</a>; diff --git a/src/webex/pages/tree.tsx b/src/webex/pages/tree.tsx index 850a3c46d..3eafbbeb4 100644 --- a/src/webex/pages/tree.tsx +++ b/src/webex/pages/tree.tsx @@ -25,7 +25,6 @@ import { amountToPretty, getTalerStampDate } from "../../helpers"; import { CoinRecord, CoinStatus, - Denomination, DenominationRecord, ExchangeRecord, PreCoinRecord, |