on master help sign in
Clean up unused imports
6d0905bFang
src/bridge/views/Login.js+2−14
@@ -1,18 +1,8 @@
1import { Nothing, Just } from 'folktale/maybe';
1import { Nothing, Just } from 'folktale/maybe';
2import React from 'react';
2import React from 'react';
3import * as azimuth from 'azimuth-js';
3import * as azimuth from 'azimuth-js';
4−import * as ob from 'urbit-ob';
4+
5−
6−import {
7− Button,
8− H1,
9− InnerLabel,
10− PointInput,
11− ValidatedSigil,
12− TicketInput,
13− Row,
14− Col,
15−} from '../components/Base';
5+import { H1, Row, Col } from '../components/Base';
16import HorizontalSelector from '../components/HorizontalSelector';
6import HorizontalSelector from '../components/HorizontalSelector';
17
7
18import Ticket from './Login/Ticket';
8import Ticket from './Login/Ticket';
@@ -21,9 +11,7 @@ import Advanced from './Login/Advanced';
21
11
22import * as need from '../lib/need';
12import * as need from '../lib/need';
23import { compose } from '../lib/lib';
13import { compose } from '../lib/lib';
24−import { urbitWalletFromTicket } from '../lib/wallet';
25import { ROUTE_NAMES } from '../lib/routeNames';
14import { ROUTE_NAMES } from '../lib/routeNames';
26−import { NETWORK_TYPES } from '../lib/network';
27
15
28import { withHistory } from '../store/history';
16import { withHistory } from '../store/history';
29import { withNetwork } from '../store/network';
17import { withNetwork } from '../store/network';
src/bridge/views/Login/Advanced.js+2−10
@@ -1,7 +1,5 @@
1−import { Just, Nothing } from 'folktale/maybe';
2import React from 'react';
1import React from 'react';
3−import { Button, H1, P } from '../../components/Base';
4−import { InnerLabelDropdown } from '../../components/Base';
2+import { P, InnerLabelDropdown } from '../../components/Base';
5import { Row, Col } from '../../components/Base';
3import { Row, Col } from '../../components/Base';
6
4
7import Ticket from './Ticket';
5import Ticket from './Ticket';
@@ -12,9 +10,6 @@ import Mnemonic from './Mnemonic';
12import PrivateKey from './PrivateKey';
10import PrivateKey from './PrivateKey';
13import Keystore from './Keystore';
11import Keystore from './Keystore';
14
12
15−import { ROUTE_NAMES } from '../../lib/routeNames';
16−import { BRIDGE_ERROR } from '../../lib/error';
17−import { withHistory } from '../../store/history';
18import { WALLET_TYPES, renderWalletType } from '../../lib/wallet';
13import { WALLET_TYPES, renderWalletType } from '../../lib/wallet';
19import { compose } from '../../lib/lib';
14import { compose } from '../../lib/lib';
20import { withWallet } from '../../store/wallet';
15import { withWallet } from '../../store/wallet';
@@ -117,7 +112,4 @@ class Advanced extends React.Component {
117 }
112 }
118}
113}
119
114
120−export default compose(
115+export default compose(withWallet)(Advanced);
121− withHistory,
122− withWallet
123−)(Advanced);
src/bridge/views/Login/Keystore.js+2−7
@@ -7,8 +7,6 @@ import { Input, InnerLabel, InputCaption } from '../../components/Base';
7import { Row, Col, H1, H3, Warning } from '../../components/Base';
7import { Row, Col, H1, H3, Warning } from '../../components/Base';
8
8
9import { BRIDGE_ERROR } from '../../lib/error';
9import { BRIDGE_ERROR } from '../../lib/error';
10−import { ROUTE_NAMES } from '../../lib/routeNames';
11−import { withHistory } from '../../store/history';
12import { EthereumWallet } from '../../lib/wallet';
10import { EthereumWallet } from '../../lib/wallet';
13import { compose } from '../../lib/lib';
11import { compose } from '../../lib/lib';
14import { withWallet } from '../../store/wallet';
12import { withWallet } from '../../store/wallet';
@@ -83,7 +81,7 @@ class Keystore extends React.Component {
83 };
81 };
84
82
85 render() {
83 render() {
86− const { history, wallet } = this.props;
84+ const { wallet } = this.props;
87 const { keystore, password, decryptionProblem } = this.state;
85 const { keystore, password, decryptionProblem } = this.state;
88
86
89 const uploadButtonClass = keystore.matchWith({
87 const uploadButtonClass = keystore.matchWith({
@@ -161,7 +159,4 @@ class Keystore extends React.Component {
161 }
159 }
162}
160}
163
161
164−export default compose(
162+export default compose(withWallet)(Keystore);
165− withHistory,
166− withWallet
167−)(Keystore);
src/bridge/views/Login/Ledger.js+2−7
@@ -9,8 +9,6 @@ import Eth from '@ledgerhq/hw-app-eth';
9import * as secp256k1 from 'secp256k1';
9import * as secp256k1 from 'secp256k1';
10
10
11import { LEDGER_LIVE_PATH, LEDGER_LEGACY_PATH } from '../../lib/ledger';
11import { LEDGER_LIVE_PATH, LEDGER_LEGACY_PATH } from '../../lib/ledger';
12−import { ROUTE_NAMES } from '../../lib/routeNames';
13−import { withHistory } from '../../store/history';
14import { compose } from '../../lib/lib';
12import { compose } from '../../lib/lib';
15import { withWallet } from '../../store/wallet';
13import { withWallet } from '../../store/wallet';
16
14
@@ -79,7 +77,7 @@ class Ledger extends React.Component {
79 }
77 }
80
78
81 render() {
79 render() {
82− const { history, wallet } = this.props;
80+ const { wallet } = this.props;
83 const { basePath, hdpath, account } = this.state;
81 const { basePath, hdpath, account } = this.state;
84 const { handlePathSelection, handleAccountSelection } = this;
82 const { handlePathSelection, handleAccountSelection } = this;
85
83
@@ -219,7 +217,4 @@ class Ledger extends React.Component {
219 }
217 }
220}
218}
221
219
222−export default compose(
220+export default compose(withWallet)(Ledger);
223− withHistory,
224− withWallet
225−)(Ledger);
src/bridge/views/Login/Mnemonic.js+3−9
@@ -1,4 +1,3 @@
1−import * as bip39 from 'bip39';
2import { Just, Nothing } from 'folktale/maybe';
1import { Just, Nothing } from 'folktale/maybe';
3import React from 'react';
2import React from 'react';
4import { Button } from '../../components/Base';
3import { Button } from '../../components/Base';
@@ -8,10 +7,8 @@ import {
8 InnerLabel,
7 InnerLabel,
9 InputCaption,
8 InputCaption,
10} from '../../components/Base';
9} from '../../components/Base';
11−import { Row, Col, H1 } from '../../components/Base';
10+import { Row, Col } from '../../components/Base';
12
11
13−import { ROUTE_NAMES } from '../../lib/routeNames';
14−import { withHistory } from '../../store/history';
15import { DEFAULT_HD_PATH, walletFromMnemonic } from '../../lib/wallet';
12import { DEFAULT_HD_PATH, walletFromMnemonic } from '../../lib/wallet';
16import { compose } from '../../lib/lib';
13import { compose } from '../../lib/lib';
17import { withWallet } from '../../store/wallet';
14import { withWallet } from '../../store/wallet';
@@ -90,7 +87,7 @@ class Mnemonic extends React.Component {
90 }
87 }
91
88
92 render() {
89 render() {
93− const { history, wallet } = this.props;
90+ const { wallet } = this.props;
94 const { mnemonic, hdpath, passphrase } = this.state;
91 const { mnemonic, hdpath, passphrase } = this.state;
95
92
96 return (
93 return (
@@ -160,7 +157,4 @@ class Mnemonic extends React.Component {
160 }
157 }
161}
158}
162
159
163−export default compose(
160+export default compose(withWallet)(Mnemonic);
164− withHistory,
165− withWallet
166−)(Mnemonic);
src/bridge/views/Login/PrivateKey.js+2−7
@@ -4,8 +4,6 @@ import { Button } from '../../components/Base';
4import { RequiredInput, InnerLabel, InputCaption } from '../../components/Base';
4import { RequiredInput, InnerLabel, InputCaption } from '../../components/Base';
5import { Row, Col, H1 } from '../../components/Base';
5import { Row, Col, H1 } from '../../components/Base';
6
6
7−import { ROUTE_NAMES } from '../../lib/routeNames';
8−import { withHistory } from '../../store/history';
9import { EthereumWallet } from '../../lib/wallet';
7import { EthereumWallet } from '../../lib/wallet';
10import { compose } from '../../lib/lib';
8import { compose } from '../../lib/lib';
11import { withWallet } from '../../store/wallet';
9import { withWallet } from '../../store/wallet';
@@ -38,7 +36,7 @@ class PrivateKey extends React.Component {
38 }
36 }
39
37
40 render() {
38 render() {
41− const { history, wallet } = this.props;
39+ const { wallet } = this.props;
42 const { privateKey } = this.state;
40 const { privateKey } = this.state;
43
41
44 return (
42 return (
@@ -75,7 +73,4 @@ class PrivateKey extends React.Component {
75 }
73 }
76}
74}
77
75
78−export default compose(
76+export default compose(withWallet)(PrivateKey);
79− withHistory,
80− withWallet
81−)(PrivateKey);
src/bridge/views/Login/Shards.js+2−7
@@ -13,8 +13,6 @@ import { Row, Col, H1, P } from '../../components/Base';
13import * as kg from 'urbit-key-generation/dist/index';
13import * as kg from 'urbit-key-generation/dist/index';
14import * as ob from 'urbit-ob';
14import * as ob from 'urbit-ob';
15
15
16−import { ROUTE_NAMES } from '../../lib/routeNames';
17−import { withHistory } from '../../store/history';
18import { urbitWalletFromTicket } from '../../lib/wallet';
16import { urbitWalletFromTicket } from '../../lib/wallet';
19import { compose } from '../../lib/lib';
17import { compose } from '../../lib/lib';
20import { withWallet } from '../../store/wallet';
18import { withWallet } from '../../store/wallet';
@@ -93,7 +91,7 @@ class Shards extends React.Component {
93 }
91 }
94
92
95 render() {
93 render() {
96− const { history, wallet } = this.props;
94+ const { wallet } = this.props;
97 const { shard1, shard2, shard3, pointName, passphrase } = this.state;
95 const { shard1, shard2, shard3, pointName, passphrase } = this.state;
98
96
99 const phPoint = this.pointPlaceholder;
97 const phPoint = this.pointPlaceholder;
@@ -213,7 +211,4 @@ class Shards extends React.Component {
213 }
211 }
214}
212}
215
213
216−export default compose(
214+export default compose(withWallet)(Shards);
217− withHistory,
218− withWallet
219−)(Shards);
src/bridge/views/Login/Ticket.js+2−10
@@ -7,22 +7,17 @@ import {
7 Button,
7 Button,
8 Row,
8 Row,
9 Col,
9 Col,
10− H1,
10+ Input,
11− P,
12 InnerLabel,
11 InnerLabel,
13 ValidatedSigil,
12 ValidatedSigil,
14 PointInput,
13 PointInput,
15 TicketInput,
14 TicketInput,
16− Input,
17− InputCaption,
18} from '../../components/Base';
15} from '../../components/Base';
19
16
20import * as need from '../../lib/need';
17import * as need from '../../lib/need';
21−import { randomPatq, compose } from '../../lib/lib';
18+import { compose } from '../../lib/lib';
22−import { ROUTE_NAMES } from '../../lib/routeNames';
23import { WALLET_TYPES, urbitWalletFromTicket } from '../../lib/wallet';
19import { WALLET_TYPES, urbitWalletFromTicket } from '../../lib/wallet';
24
20
25−import { withHistory } from '../../store/history';
26import { withWallet } from '../../store/wallet';
21import { withWallet } from '../../store/wallet';
27import { withNetwork } from '../../store/network';
22import { withNetwork } from '../../store/network';
28import { withPointCursor } from '../../store/pointCursor';
23import { withPointCursor } from '../../store/pointCursor';
@@ -116,8 +111,6 @@ class Ticket extends React.Component {
116 }
111 }
117
112
118 render() {
113 render() {
119− const { history, wallet } = this.props;
120−
121 const pointInput = (
114 const pointInput = (
122 <PointInput
115 <PointInput
123 className="mono mt-8"
116 className="mono mt-8"
@@ -202,7 +195,6 @@ class Ticket extends React.Component {
202}
195}
203
196
204export default compose(
197export default compose(
205− withHistory,
206 withWallet,
198 withWallet,
207 withNetwork,
199 withNetwork,
208 withPointCursor
200 withPointCursor
src/bridge/views/Login/Trezor.js+2−7
@@ -8,8 +8,6 @@ import TrezorConnect from 'trezor-connect';
8import * as secp256k1 from 'secp256k1';
8import * as secp256k1 from 'secp256k1';
9
9
10import { TREZOR_PATH } from '../../lib/trezor';
10import { TREZOR_PATH } from '../../lib/trezor';
11−import { ROUTE_NAMES } from '../../lib/routeNames';
12−import { withHistory } from '../../store/history';
13import { compose } from '../../lib/lib';
11import { compose } from '../../lib/lib';
14import { withWallet } from '../../store/wallet';
12import { withWallet } from '../../store/wallet';
15
13
@@ -63,7 +61,7 @@ class Trezor extends React.Component {
63 }
61 }
64
62
65 render() {
63 render() {
66− const { history, wallet } = this.props;
64+ const { wallet } = this.props;
67 const { hdpath, account } = this.state;
65 const { hdpath, account } = this.state;
68 const { handleAccountSelection } = this;
66 const { handleAccountSelection } = this;
69
67
@@ -141,7 +139,4 @@ class Trezor extends React.Component {
141 }
139 }
142}
140}
143
141
144−export default compose(
142+export default compose(withWallet)(Trezor);
145− withHistory,
146− withWallet
147−)(Trezor);