1import React from 'react';
2import { P, InnerLabelDropdown } from '../../components/old/Base';
3import { Row, Col } from '../../components/old/Base';
5import Ticket from './Ticket';
6import Shards from './Shards';
7import Ledger from './Ledger';
8import Trezor from './Trezor';
9import Mnemonic from './Mnemonic';
10import PrivateKey from './PrivateKey';
11import Keystore from './Keystore';
13import { WALLET_TYPES, renderWalletType } from '../../lib/wallet';
14import { compose } from '../../lib/lib';
15import { withWallet } from '../../store/wallet';
17class Advanced extends React.Component {
22 selected: WALLET_TYPES.TICKET,
25 this.handleSelection = this.handleSelection.bind(this);
31 title: 'Urbit Master Ticket',
32 value: WALLET_TYPES.TICKET,
35 title: 'Urbit Master Ticket (Shards)',
36 value: WALLET_TYPES.SHARDS,
43 value: WALLET_TYPES.LEDGER,
47 value: WALLET_TYPES.TREZOR,
53 title: 'BIP39 Mnemonic',
54 value: WALLET_TYPES.MNEMONIC,
57 title: 'Ethereum Private Key',
58 value: WALLET_TYPES.PRIVATE_KEY,
61 title: 'Ethereum Keystore File',
62 value: WALLET_TYPES.KEYSTORE,
67 handleSelection(selected) {
68 this.setState({ selected });
72 const loginCompleted = this.props.loginCompleted;
73 const inputs = (() => {
74 switch (this.state.selected) {
75 case WALLET_TYPES.TICKET:
76 return <Ticket advanced={true} loginCompleted={loginCompleted} />;
77 case WALLET_TYPES.SHARDS:
78 return <Shards loginCompleted={loginCompleted} />;
80 case WALLET_TYPES.LEDGER:
81 return <Ledger loginCompleted={loginCompleted} />;
82 case WALLET_TYPES.TREZOR:
83 return <Trezor loginCompleted={loginCompleted} />;
85 case WALLET_TYPES.MNEMONIC:
86 return <Mnemonic advanced={true} loginCompleted={loginCompleted} />;
87 case WALLET_TYPES.PRIVATE_KEY:
88 return <PrivateKey loginCompleted={loginCompleted} />;
89 case WALLET_TYPES.KEYSTORE:
90 return <Keystore loginCompleted={loginCompleted} />;
93 return <P>{'Coming soon.'}</P>;
101 className={'mb-10 mt-6'}
102 title={'Wallet Type:'}
103 options={this.getWalletOptions()}
104 handleUpdate={this.handleSelection}
105 currentSelectionTitle={renderWalletType(this.state.selected)}
115export default compose(withWallet)(Advanced);
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list