import Maybe from 'folktale/maybe' import React from 'react' import { Button, H1, P } from '../components/Base' import { InnerLabelDropdown, DropdownItem, DropdownDivider } from '../components/Base' import { Row, Col } from '../components/Base' import { ROUTE_NAMES } from '../lib/router' import { WALLET_NAMES, renderWalletType } from '../lib/wallet' class Wallet extends React.Component { constructor(props) { super(props) this.state = { dropdownOpen: false } this.toggle = this.toggle.bind(this) this.close = this.close.bind(this) } componentDidMount() { const { setWallet } = this.props setWallet(Maybe.Nothing()) } toggle() { this.setState((state, _) => ({ dropdownOpen: !state.dropdownOpen })) } selectClose(f) { f() this.setState({ dropdownOpen: false }) } close () { this.setState({ dropdownOpen: false }) } render() { const { props, state } = this return (

{ 'Unlock a Wallet' }

{ `To manage your assets, you need to unlock a wallet. Please select how you would like to access your wallet.` }

this.selectClose(() => props.setWalletType(WALLET_NAMES.TICKET)) } > { 'Urbit Master Ticket' } this.selectClose(() => props.setWalletType(WALLET_NAMES.SHARDS)) } > { 'Urbit Master Ticket (Shards)' } this.selectClose(() => props.setWalletType(WALLET_NAMES.LEDGER)) } > { 'Ledger' } this.selectClose(() => props.setWalletType(WALLET_NAMES.TREZOR)) } > { 'Trezor' } this.selectClose(() => props.setWalletType(WALLET_NAMES.MNEMONIC)) } > { 'BIP39 Mnemonic' } this.selectClose(() => props.setWalletType(WALLET_NAMES.PRIVATE_KEY)) } > { 'Ethereum Private Key' } this.selectClose(() => props.setWalletType(WALLET_NAMES.KEYSTORE)) } > { 'Ethereum Keystore File' }
) } } export default Wallet