Fixed some eslint errors

pull/149/head
Vladimir Volek 6 years ago
parent e4b6cc24dd
commit ae729dcc46

@ -37,6 +37,7 @@
"flow-webpack-plugin": "^1.2.0",
"git-revision-webpack-plugin": "^3.0.3",
"hdkey": "^0.8.0",
"history": "^4.7.2",
"html-webpack-plugin": "^3.2.0",
"http-server": "^0.11.1",
"jest-fetch-mock": "^1.6.5",

@ -7,7 +7,6 @@ import Icon from 'components/Icon';
import {
FONT_SIZE,
FONT_WEIGHT,
FONT_FAMILY,
TRANSITION,
} from 'config/variables';

@ -60,8 +60,6 @@ class ConfirmUnverifiedAddress extends Component<Props> {
const {
account,
} = this.props.selectedAccount;
if (!account) return null;
this.props.modalActions.onCancel();
this.props.receiveActions.showAddress(account.addressPath);
}
@ -104,7 +102,7 @@ class ConfirmUnverifiedAddress extends Component<Props> {
<H2>{ deviceStatus }</H2>
<StyledP isSmaller>To prevent phishing attacks, you should verify the address on your TREZOR first. { claim } to continue with the verification process.</StyledP>
<Row>
<StyledButton onClick={() => this.verifyAddress()}>Try again</StyledButton>
<StyledButton onClick={() => (!this.props.selectedAccount.account ? this.verifyAddress() : 'false')}>Try again</StyledButton>
<StyledButton isWhite onClick={() => this.showUnverifiedAddress()}>Show unverified address</StyledButton>
</Row>
</Wrapper>

@ -1,5 +1,4 @@
/* @flow */
import * as React from 'react';
import { Notification } from 'components/Notification';
import type { Props } from '../../index';

@ -11,18 +11,16 @@ export type BlockchainNetwork = {
export type State = Array<BlockchainNetwork>;
export const initialState: State = [];
export const initialState: State = [];
const find = (state: State, name: string): number => {
return state.findIndex(b => b.name === name);
}
const find = (state: State, name: string): number => state.findIndex(b => b.name === name);
const connect = (state: State, action: any): State => {
const name = action.payload.coin.shortcut.toLowerCase();
const network: BlockchainNetwork = {
name,
connected: true,
}
};
const newState: State = [...state];
const index: number = find(newState, name);
if (index >= 0) {
@ -38,7 +36,7 @@ const disconnect = (state: State, action: any): State => {
const network: BlockchainNetwork = {
name,
connected: false,
}
};
const newState: State = [...state];
const index: number = find(newState, name);
if (index >= 0) {
@ -52,7 +50,6 @@ const disconnect = (state: State, action: any): State => {
export default (state: State = initialState, action: Action): State => {
switch (action.type) {
case BLOCKCHAIN.CONNECT:
return connect(state, action);
case BLOCKCHAIN.ERROR:

@ -11,7 +11,7 @@ import services from 'services';
import Raven from 'raven-js';
import RavenMiddleware from 'redux-raven-middleware';
import type { Action, GetState, Store } from 'flowtype';
import type { Action, GetState } from 'flowtype';
export const history: History = createHistory({ queryKey: false });
@ -46,7 +46,7 @@ if (process.env.NODE_ENV === 'development') {
collapsed: true,
});
const devToolsExtension: ?Function = window.devToolsExtension;
const { devToolsExtension }: ?Function = window;
if (typeof devToolsExtension === 'function') {
enhancers.push(devToolsExtension());
}

@ -3,7 +3,6 @@
import React, { Component } from 'react';
import styled from 'styled-components';
import colors from 'config/colors';
import PropTypes from 'prop-types';
import { FONT_SIZE, FONT_WEIGHT } from 'config/variables';
import { Select } from 'components/Select';
import Link from 'components/Link';

@ -8,7 +8,6 @@ import Input from 'components/inputs/Input';
import Textarea from 'components/Textarea';
import Tooltip from 'components/Tooltip';
import Icon from 'components/Icon';
import Link from 'components/Link';
import ICONS from 'config/icons';
import type { Props } from '../../Container';

@ -25,7 +25,6 @@ import type {
type Props = {
device: ?TrezorDevice;
cancel: typeof RouterActions.selectFirstAvailableDevice,
}
const Wrapper = styled.section`

@ -3,7 +3,7 @@ import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import GitRevisionPlugin from 'git-revision-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import CopyWebpackPlugin from 'copy-webpack-plugin';
import MiniCssExtractPlugin from '../../trezor-connect/node_modules/mini-css-extract-plugin';
import MiniCssExtractPlugin from '../../trezor-connect/node_modules/mini-css-extract-plugin'; // eslint-disable-line
import {
TREZOR_CONNECT_ROOT,

Loading…
Cancel
Save