mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-30 19:00:53 +00:00
commit
7ff2e8642d
@ -37,6 +37,7 @@
|
|||||||
"flow-webpack-plugin": "^1.2.0",
|
"flow-webpack-plugin": "^1.2.0",
|
||||||
"git-revision-webpack-plugin": "^3.0.3",
|
"git-revision-webpack-plugin": "^3.0.3",
|
||||||
"hdkey": "^0.8.0",
|
"hdkey": "^0.8.0",
|
||||||
|
"history": "^4.7.2",
|
||||||
"html-webpack-plugin": "^3.2.0",
|
"html-webpack-plugin": "^3.2.0",
|
||||||
"jest-fetch-mock": "^1.6.5",
|
"jest-fetch-mock": "^1.6.5",
|
||||||
"morgan": "^1.9.1",
|
"morgan": "^1.9.1",
|
||||||
|
@ -7,7 +7,6 @@ import Icon from 'components/Icon';
|
|||||||
import {
|
import {
|
||||||
FONT_SIZE,
|
FONT_SIZE,
|
||||||
FONT_WEIGHT,
|
FONT_WEIGHT,
|
||||||
FONT_FAMILY,
|
|
||||||
TRANSITION,
|
TRANSITION,
|
||||||
} from 'config/variables';
|
} from 'config/variables';
|
||||||
|
|
||||||
|
@ -60,8 +60,6 @@ class ConfirmUnverifiedAddress extends Component<Props> {
|
|||||||
const {
|
const {
|
||||||
account,
|
account,
|
||||||
} = this.props.selectedAccount;
|
} = this.props.selectedAccount;
|
||||||
if (!account) return null;
|
|
||||||
|
|
||||||
this.props.modalActions.onCancel();
|
this.props.modalActions.onCancel();
|
||||||
this.props.receiveActions.showAddress(account.addressPath);
|
this.props.receiveActions.showAddress(account.addressPath);
|
||||||
}
|
}
|
||||||
@ -104,7 +102,7 @@ class ConfirmUnverifiedAddress extends Component<Props> {
|
|||||||
<H2>{ deviceStatus }</H2>
|
<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>
|
<StyledP isSmaller>To prevent phishing attacks, you should verify the address on your TREZOR first. { claim } to continue with the verification process.</StyledP>
|
||||||
<Row>
|
<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>
|
<StyledButton isWhite onClick={() => this.showUnverifiedAddress()}>Show unverified address</StyledButton>
|
||||||
</Row>
|
</Row>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
/* @flow */
|
/* @flow */
|
||||||
import * as React from 'react';
|
|
||||||
import { Notification } from 'components/Notification';
|
import { Notification } from 'components/Notification';
|
||||||
|
|
||||||
import type { Props } from '../../index';
|
import type { Props } from '../../index';
|
||||||
|
@ -13,16 +13,14 @@ export type State = Array<BlockchainNetwork>;
|
|||||||
|
|
||||||
export const initialState: State = [];
|
export const initialState: State = [];
|
||||||
|
|
||||||
const find = (state: State, name: string): number => {
|
const find = (state: State, name: string): number => state.findIndex(b => b.name === name);
|
||||||
return state.findIndex(b => b.name === name);
|
|
||||||
}
|
|
||||||
|
|
||||||
const connect = (state: State, action: any): State => {
|
const connect = (state: State, action: any): State => {
|
||||||
const name = action.payload.coin.shortcut.toLowerCase();
|
const name = action.payload.coin.shortcut.toLowerCase();
|
||||||
const network: BlockchainNetwork = {
|
const network: BlockchainNetwork = {
|
||||||
name,
|
name,
|
||||||
connected: true,
|
connected: true,
|
||||||
}
|
};
|
||||||
const newState: State = [...state];
|
const newState: State = [...state];
|
||||||
const index: number = find(newState, name);
|
const index: number = find(newState, name);
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
@ -38,7 +36,7 @@ const disconnect = (state: State, action: any): State => {
|
|||||||
const network: BlockchainNetwork = {
|
const network: BlockchainNetwork = {
|
||||||
name,
|
name,
|
||||||
connected: false,
|
connected: false,
|
||||||
}
|
};
|
||||||
const newState: State = [...state];
|
const newState: State = [...state];
|
||||||
const index: number = find(newState, name);
|
const index: number = find(newState, name);
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
@ -52,7 +50,6 @@ const disconnect = (state: State, action: any): State => {
|
|||||||
|
|
||||||
export default (state: State = initialState, action: Action): State => {
|
export default (state: State = initialState, action: Action): State => {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
|
|
||||||
case BLOCKCHAIN.CONNECT:
|
case BLOCKCHAIN.CONNECT:
|
||||||
return connect(state, action);
|
return connect(state, action);
|
||||||
case BLOCKCHAIN.ERROR:
|
case BLOCKCHAIN.ERROR:
|
||||||
|
@ -11,7 +11,7 @@ import services from 'services';
|
|||||||
import Raven from 'raven-js';
|
import Raven from 'raven-js';
|
||||||
import RavenMiddleware from 'redux-raven-middleware';
|
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 });
|
export const history: History = createHistory({ queryKey: false });
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
collapsed: true,
|
collapsed: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const devToolsExtension: ?Function = window.devToolsExtension;
|
const { devToolsExtension }: ?Function = window;
|
||||||
if (typeof devToolsExtension === 'function') {
|
if (typeof devToolsExtension === 'function') {
|
||||||
enhancers.push(devToolsExtension());
|
enhancers.push(devToolsExtension());
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { FONT_SIZE, FONT_WEIGHT } from 'config/variables';
|
import { FONT_SIZE, FONT_WEIGHT } from 'config/variables';
|
||||||
import { Select } from 'components/Select';
|
import { Select } from 'components/Select';
|
||||||
import Link from 'components/Link';
|
import Link from 'components/Link';
|
||||||
|
@ -8,7 +8,6 @@ import Input from 'components/inputs/Input';
|
|||||||
import Textarea from 'components/Textarea';
|
import Textarea from 'components/Textarea';
|
||||||
import Tooltip from 'components/Tooltip';
|
import Tooltip from 'components/Tooltip';
|
||||||
import Icon from 'components/Icon';
|
import Icon from 'components/Icon';
|
||||||
import Link from 'components/Link';
|
|
||||||
import ICONS from 'config/icons';
|
import ICONS from 'config/icons';
|
||||||
|
|
||||||
import type { Props } from '../../Container';
|
import type { Props } from '../../Container';
|
||||||
|
@ -25,7 +25,6 @@ import type {
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
device: ?TrezorDevice;
|
device: ?TrezorDevice;
|
||||||
cancel: typeof RouterActions.selectFirstAvailableDevice,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const Wrapper = styled.section`
|
const Wrapper = styled.section`
|
||||||
|
@ -3,7 +3,7 @@ import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
|
|||||||
import GitRevisionPlugin from 'git-revision-webpack-plugin';
|
import GitRevisionPlugin from 'git-revision-webpack-plugin';
|
||||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||||
import CopyWebpackPlugin from 'copy-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 {
|
import {
|
||||||
TREZOR_CONNECT_ROOT,
|
TREZOR_CONNECT_ROOT,
|
||||||
|
Loading…
Reference in New Issue
Block a user