on master help sign in
Clean up unused imports
commit6d0905b5815fe946383f7fea651e91ed415db75d authorFang <git@fang.io> dateThu 20 Jun 2019, 16:08 (7 years ago) parent6c5a179
9 files changed+19−78
src/bridge/views/Login.js+2−14 src/bridge/views/Login/Advanced.js+2−10 src/bridge/views/Login/Keystore.js+2−7 src/bridge/views/Login/Ledger.js+2−7 src/bridge/views/Login/Mnemonic.js+3−9 src/bridge/views/Login/PrivateKey.js+2−7 src/bridge/views/Login/Shards.js+2−7 src/bridge/views/Login/Ticket.js+2−10 src/bridge/views/Login/Trezor.js+2−7
src/bridge/views/Login.js+2−14
@@ -1,18 +1,8 @@
11import { Nothing, Just } from 'folktale/maybe';
22import React from 'react';
33import * as azimuth from 'azimuth-js';
4−import * as ob from 'urbit-ob';
5−
6−import {
7− Button,
8− H1,
9− InnerLabel,
10− PointInput,
11− ValidatedSigil,
12− TicketInput,
13− Row,
14− Col,
15−} from '../components/Base';
4+
5+import { H1, Row, Col } from '../components/Base';
166import HorizontalSelector from '../components/HorizontalSelector';
177
188import Ticket from './Login/Ticket';
@@ -21,9 +11,7 @@ import Advanced from './Login/Advanced';
2111
2212import * as need from '../lib/need';
2313import { compose } from '../lib/lib';
24−import { urbitWalletFromTicket } from '../lib/wallet';
2514import { ROUTE_NAMES } from '../lib/routeNames';
26−import { NETWORK_TYPES } from '../lib/network';
2715
2816import { withHistory } from '../store/history';
2917import { withNetwork } from '../store/network';
src/bridge/views/Login/Advanced.js+2−10
@@ -1,7 +1,5 @@
1−import { Just, Nothing } from 'folktale/maybe';
21import React from 'react';
3−import { Button, H1, P } from '../../components/Base';
4−import { InnerLabelDropdown } from '../../components/Base';
2+import { P, InnerLabelDropdown } from '../../components/Base';
53import { Row, Col } from '../../components/Base';
64
75import Ticket from './Ticket';
@@ -12,9 +10,6 @@ import Mnemonic from './Mnemonic';
1210import PrivateKey from './PrivateKey';
1311import Keystore from './Keystore';
1412
15−import { ROUTE_NAMES } from '../../lib/routeNames';
16−import { BRIDGE_ERROR } from '../../lib/error';
17−import { withHistory } from '../../store/history';
1813import { WALLET_TYPES, renderWalletType } from '../../lib/wallet';
1914import { compose } from '../../lib/lib';
2015import { withWallet } from '../../store/wallet';
@@ -117,7 +112,4 @@ class Advanced extends React.Component {
117112 }
118113}
119114
120−export default compose(
121− withHistory,
122− withWallet
123−)(Advanced);
115+export default compose(withWallet)(Advanced);
src/bridge/views/Login/Keystore.js+2−7
@@ -7,8 +7,6 @@ import { Input, InnerLabel, InputCaption } from '../../components/Base';
77import { Row, Col, H1, H3, Warning } from '../../components/Base';
88
99import { BRIDGE_ERROR } from '../../lib/error';
10−import { ROUTE_NAMES } from '../../lib/routeNames';
11−import { withHistory } from '../../store/history';
1210import { EthereumWallet } from '../../lib/wallet';
1311import { compose } from '../../lib/lib';
1412import { withWallet } from '../../store/wallet';
@@ -83,7 +81,7 @@ class Keystore extends React.Component {
8381 };
8482
8583 render() {
86− const { history, wallet } = this.props;
84+ const { wallet } = this.props;
8785 const { keystore, password, decryptionProblem } = this.state;
8886
8987 const uploadButtonClass = keystore.matchWith({
@@ -161,7 +159,4 @@ class Keystore extends React.Component {
161159 }
162160}
163161
164−export default compose(
165− withHistory,
166− withWallet
167−)(Keystore);
162+export default compose(withWallet)(Keystore);
src/bridge/views/Login/Ledger.js+2−7
@@ -9,8 +9,6 @@ import Eth from '@ledgerhq/hw-app-eth';
99import * as secp256k1 from 'secp256k1';
1010
1111import { LEDGER_LIVE_PATH, LEDGER_LEGACY_PATH } from '../../lib/ledger';
12−import { ROUTE_NAMES } from '../../lib/routeNames';
13−import { withHistory } from '../../store/history';
1412import { compose } from '../../lib/lib';
1513import { withWallet } from '../../store/wallet';
1614
@@ -79,7 +77,7 @@ class Ledger extends React.Component {
7977 }
8078
8179 render() {
82− const { history, wallet } = this.props;
80+ const { wallet } = this.props;
8381 const { basePath, hdpath, account } = this.state;
8482 const { handlePathSelection, handleAccountSelection } = this;
8583
@@ -219,7 +217,4 @@ class Ledger extends React.Component {
219217 }
220218}
221219
222−export default compose(
223− withHistory,
224− withWallet
225−)(Ledger);
220+export default compose(withWallet)(Ledger);
src/bridge/views/Login/Mnemonic.js+3−9
@@ -1,4 +1,3 @@
1−import * as bip39 from 'bip39';
21import { Just, Nothing } from 'folktale/maybe';
32import React from 'react';
43import { Button } from '../../components/Base';
@@ -8,10 +7,8 @@ import {
87 InnerLabel,
98 InputCaption,
109} from '../../components/Base';
11−import { Row, Col, H1 } from '../../components/Base';
10+import { Row, Col } from '../../components/Base';
1211
13−import { ROUTE_NAMES } from '../../lib/routeNames';
14−import { withHistory } from '../../store/history';
1512import { DEFAULT_HD_PATH, walletFromMnemonic } from '../../lib/wallet';
1613import { compose } from '../../lib/lib';
1714import { withWallet } from '../../store/wallet';
@@ -90,7 +87,7 @@ class Mnemonic extends React.Component {
9087 }
9188
9289 render() {
93− const { history, wallet } = this.props;
90+ const { wallet } = this.props;
9491 const { mnemonic, hdpath, passphrase } = this.state;
9592
9693 return (
@@ -160,7 +157,4 @@ class Mnemonic extends React.Component {
160157 }
161158}
162159
163−export default compose(
164− withHistory,
165− withWallet
166−)(Mnemonic);
160+export default compose(withWallet)(Mnemonic);
src/bridge/views/Login/PrivateKey.js+2−7
@@ -4,8 +4,6 @@ import { Button } from '../../components/Base';
44import { RequiredInput, InnerLabel, InputCaption } from '../../components/Base';
55import { Row, Col, H1 } from '../../components/Base';
66
7−import { ROUTE_NAMES } from '../../lib/routeNames';
8−import { withHistory } from '../../store/history';
97import { EthereumWallet } from '../../lib/wallet';
108import { compose } from '../../lib/lib';
119import { withWallet } from '../../store/wallet';
@@ -38,7 +36,7 @@ class PrivateKey extends React.Component {
3836 }
3937
4038 render() {
41− const { history, wallet } = this.props;
39+ const { wallet } = this.props;
4240 const { privateKey } = this.state;
4341
4442 return (
@@ -75,7 +73,4 @@ class PrivateKey extends React.Component {
7573 }
7674}
7775
78−export default compose(
79− withHistory,
80− withWallet
81−)(PrivateKey);
76+export default compose(withWallet)(PrivateKey);
src/bridge/views/Login/Shards.js+2−7
@@ -13,8 +13,6 @@ import { Row, Col, H1, P } from '../../components/Base';
1313import * as kg from 'urbit-key-generation/dist/index';
1414import * as ob from 'urbit-ob';
1515
16−import { ROUTE_NAMES } from '../../lib/routeNames';
17−import { withHistory } from '../../store/history';
1816import { urbitWalletFromTicket } from '../../lib/wallet';
1917import { compose } from '../../lib/lib';
2018import { withWallet } from '../../store/wallet';
@@ -93,7 +91,7 @@ class Shards extends React.Component {
9391 }
9492
9593 render() {
96− const { history, wallet } = this.props;
94+ const { wallet } = this.props;
9795 const { shard1, shard2, shard3, pointName, passphrase } = this.state;
9896
9997 const phPoint = this.pointPlaceholder;
@@ -213,7 +211,4 @@ class Shards extends React.Component {
213211 }
214212}
215213
216−export default compose(
217− withHistory,
218− withWallet
219−)(Shards);
214+export default compose(withWallet)(Shards);
src/bridge/views/Login/Ticket.js+2−10
@@ -7,22 +7,17 @@ import {
77 Button,
88 Row,
99 Col,
10− H1,
11− P,
10+ Input,
1211 InnerLabel,
1312 ValidatedSigil,
1413 PointInput,
1514 TicketInput,
16− Input,
17− InputCaption,
1815} from '../../components/Base';
1916
2017import * as need from '../../lib/need';
21−import { randomPatq, compose } from '../../lib/lib';
22−import { ROUTE_NAMES } from '../../lib/routeNames';
18+import { compose } from '../../lib/lib';
2319import { WALLET_TYPES, urbitWalletFromTicket } from '../../lib/wallet';
2420
25−import { withHistory } from '../../store/history';
2621import { withWallet } from '../../store/wallet';
2722import { withNetwork } from '../../store/network';
2823import { withPointCursor } from '../../store/pointCursor';
@@ -116,8 +111,6 @@ class Ticket extends React.Component {
116111 }
117112
118113 render() {
119− const { history, wallet } = this.props;
120−
121114 const pointInput = (
122115 <PointInput
123116 className="mono mt-8"
@@ -202,7 +195,6 @@ class Ticket extends React.Component {
202195}
203196
204197export default compose(
205− withHistory,
206198 withWallet,
207199 withNetwork,
208200 withPointCursor
src/bridge/views/Login/Trezor.js+2−7
@@ -8,8 +8,6 @@ import TrezorConnect from 'trezor-connect';
88import * as secp256k1 from 'secp256k1';
99
1010import { TREZOR_PATH } from '../../lib/trezor';
11−import { ROUTE_NAMES } from '../../lib/routeNames';
12−import { withHistory } from '../../store/history';
1311import { compose } from '../../lib/lib';
1412import { withWallet } from '../../store/wallet';
1513
@@ -63,7 +61,7 @@ class Trezor extends React.Component {
6361 }
6462
6563 render() {
66− const { history, wallet } = this.props;
64+ const { wallet } = this.props;
6765 const { hdpath, account } = this.state;
6866 const { handleAccountSelection } = this;
6967
@@ -141,7 +139,4 @@ class Trezor extends React.Component {
141139 }
142140}
143141
144−export default compose(
145− withHistory,
146− withWallet
147−)(Trezor);
142+export default compose(withWallet)(Trezor);