@@ -6,7 +6,7 @@ import { Button, UploadButton } from '../../components/Base';
6import { Input, InnerLabel, InputCaption } from '../../components/Base';
6import { Input, InnerLabel, InputCaption } from '../../components/Base';
7import { Row, Col, H1, H3, Warning } from '../../components/Base';
7import { Row, Col, H1, H3, Warning } from '../../components/Base';
9−import { BRIDGE_ERROR } from '../../lib/error';
9+import * as need from '../../lib/need';
10import { EthereumWallet } from '../../lib/wallet';
10import { EthereumWallet } from '../../lib/wallet';
11import { compose } from '../../lib/lib';
11import { compose } from '../../lib/lib';
12import { withWallet } from '../../store/wallet';
12import { withWallet } from '../../store/wallet';
@@ -32,21 +32,10 @@ class Keystore extends React.Component {
33 constructWallet() {
33 constructWallet() {
34 const { setWallet } = this.props;
34 const { setWallet } = this.props;
35− const { keystore, password } = this.state;
35+ const { password } = this.state;
38− const text = keystore.matchWith({
38+ const text = need.keystore(this.state);
40− throw BRIDGE_ERROR.MISSING_KEYSTORE;
44− Ok: result => result.value,
46− throw BRIDGE_ERROR.MISSING_KEYSTORE;
51 const json = JSON.parse(text);
40 const json = JSON.parse(text);
52 const privateKey = keythereum.recover(password, json);
41 const privateKey = keythereum.recover(password, json);