aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/top_bar
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-07-02 05:48:01 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-07-02 05:51:02 +0800
commit86d4ffe7e561ec72aa41300fd6c1e8f493ba0306 (patch)
tree08184b7b80bdfbe29c713ea7ff325f53f5adeaf1 /packages/website/ts/components/top_bar
parent2dea179333dd14ad74aea65bb6558aac3bb716f4 (diff)
downloaddexon-sol-tools-86d4ffe7e561ec72aa41300fd6c1e8f493ba0306.tar.gz
dexon-sol-tools-86d4ffe7e561ec72aa41300fd6c1e8f493ba0306.tar.zst
dexon-sol-tools-86d4ffe7e561ec72aa41300fd6c1e8f493ba0306.zip
Lint fixes
Diffstat (limited to 'packages/website/ts/components/top_bar')
-rw-r--r--packages/website/ts/components/top_bar/provider_display.tsx13
1 files changed, 3 insertions, 10 deletions
diff --git a/packages/website/ts/components/top_bar/provider_display.tsx b/packages/website/ts/components/top_bar/provider_display.tsx
index c2915f9a9..74f9beedb 100644
--- a/packages/website/ts/components/top_bar/provider_display.tsx
+++ b/packages/website/ts/components/top_bar/provider_display.tsx
@@ -1,7 +1,6 @@
import { Styles } from '@0xproject/react-shared';
import * as _ from 'lodash';
import CircularProgress from 'material-ui/CircularProgress';
-import RaisedButton from 'material-ui/RaisedButton';
import ActionAccountBalanceWallet from 'material-ui/svg-icons/action/account-balance-wallet';
import Lock from 'material-ui/svg-icons/action/lock';
import * as React from 'react';
@@ -22,8 +21,7 @@ import {
import { Text } from 'ts/components/ui/text';
import { Dispatcher } from 'ts/redux/dispatcher';
import { colors } from 'ts/style/colors';
-import { AccountState, ProviderType, WebsitePaths } from 'ts/types';
-import { constants } from 'ts/utils/constants';
+import { AccountState, ProviderType } from 'ts/types';
import { utils } from 'ts/utils/utils';
const ROOT_HEIGHT = 24;
@@ -50,10 +48,6 @@ const styles: Styles = {
export class ProviderDisplay extends React.Component<ProviderDisplayProps, ProviderDisplayState> {
public render(): React.ReactNode {
- const isExternallyInjectedProvider = utils.isExternallyInjected(
- this.props.providerType,
- this.props.injectedProviderName,
- );
const activeNode = (
<Island className="flex items-center py1 px2" style={styles.root}>
{this._renderIcon()}
@@ -63,12 +57,11 @@ export class ProviderDisplay extends React.Component<ProviderDisplayProps, Provi
{this._renderInjectedProvider()}
</Island>
);
- const hasLedgerProvider = this.props.providerType === ProviderType.Ledger;
return (
<div style={{ width: 'fit-content', height: 48, float: 'right' }}>
<DropDown
activeNode={activeNode}
- popoverContent={this.renderPopoverContent(isExternallyInjectedProvider, hasLedgerProvider)}
+ popoverContent={this._renderPopoverContent()}
anchorOrigin={{ horizontal: 'middle', vertical: 'bottom' }}
targetOrigin={{ horizontal: 'middle', vertical: 'top' }}
zDepth={1}
@@ -76,7 +69,7 @@ export class ProviderDisplay extends React.Component<ProviderDisplayProps, Provi
</div>
);
}
- public renderPopoverContent(hasInjectedProvider: boolean, hasLedgerProvider: boolean): React.ReactNode {
+ private _renderPopoverContent(): React.ReactNode {
const accountState = this._getAccountState();
switch (accountState) {
case AccountState.Ready: