1import Maybe from 'folktale/maybe'
2import React from 'react'
3import { Button, H1, P } from '../components/Base'
8} from '../components/Base'
9import { Row, Col } from '../components/Base'
11import { ROUTE_NAMES } from '../lib/router'
12import { WALLET_NAMES, renderWalletType } from '../lib/wallet'
14class Wallet extends React.Component {
23 this.toggle = this.toggle.bind(this)
24 this.close = this.close.bind(this)
29 const { setWallet } = this.props
30 setWallet(Maybe.Nothing())
34 this.setState((state, _) => ({
35 dropdownOpen: !state.dropdownOpen
41 this.setState({ dropdownOpen: false })
45 this.setState({ dropdownOpen: false })
49 const { props, state } = this
54 <H1>{ 'Unlock a Wallet' }</H1>
58 `To manage your assets, you need to unlock a wallet.
59 Please select how you would like to access your wallet.`
65 className={'mb-10 mt-6'}
66 handleToggle={this.toggle}
67 handleClose={this.close}
68 isOpen={state.dropdownOpen}
69 title={'Wallet Type:'}
70 currentSelectionTitle={renderWalletType(props.walletType)}>
73 onClick={ () => this.selectClose(() => props.setWalletType(WALLET_NAMES.TICKET)) }
75 { 'Urbit Master Ticket' }
79 onClick={ () => this.selectClose(() => props.setWalletType(WALLET_NAMES.SHARDS)) }
81 { 'Urbit Master Ticket (Shards)' }
87 onClick={ () => this.selectClose(() => props.setWalletType(WALLET_NAMES.LEDGER)) }
93 onClick={ () => this.selectClose(() => props.setWalletType(WALLET_NAMES.TREZOR)) }
101 onClick={ () => this.selectClose(() => props.setWalletType(WALLET_NAMES.MNEMONIC)) }
107 onClick={ () => this.selectClose(() => props.setWalletType(WALLET_NAMES.PRIVATE_KEY)) }
109 { 'Ethereum Private Key' }
113 onClick={ () => this.selectClose(() => props.setWalletType(WALLET_NAMES.KEYSTORE)) }
115 { 'Ethereum Keystore File' }
120 </InnerLabelDropdown>
125 () => props.pushRoute(
126 props.walletType === WALLET_NAMES.MNEMONIC
127 ? ROUTE_NAMES.MNEMONIC
128 : props.walletType === WALLET_NAMES.TICKET
130 : props.walletType === WALLET_NAMES.SHARDS
132 : props.walletType === WALLET_NAMES.LEDGER
134 : props.walletType === WALLET_NAMES.TREZOR
136 : props.walletType === WALLET_NAMES.PRIVATE_KEY
137 ? ROUTE_NAMES.PRIVATE_KEY
138 : props.walletType === WALLET_NAMES.KEYSTORE
139 ? ROUTE_NAMES.KEYSTORE
140 : ROUTE_NAMES.DEFAULT
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