1import React from 'react';
2import Maybe from 'folktale/maybe';
4import { H1, P } from '../components/old/Base';
5import { InnerLabelDropdown } from '../components/old/Base';
7import View from 'components/View';
8import { ForwardButton } from 'components/Buttons';
10import { useHistory } from '../store/history';
11import { useWallet } from '../store/wallet';
13import { ROUTE_NAMES } from '../lib/routeNames';
14import { WALLET_TYPES, renderWalletType } from '../lib/wallet';
15import useLifecycle from 'lib/useLifecycle';
17const kWalletOptions = [
19 title: 'Urbit Master Ticket',
20 value: WALLET_TYPES.TICKET,
23 title: 'Urbit Master Ticket (Shards)',
24 value: WALLET_TYPES.SHARDS,
31 value: WALLET_TYPES.LEDGER,
35 value: WALLET_TYPES.TREZOR,
41 title: 'BIP39 Mnemonic',
42 value: WALLET_TYPES.MNEMONIC,
45 title: 'Ethereum Private Key',
46 value: WALLET_TYPES.PRIVATE_KEY,
49 title: 'Ethereum Keystore File',
50 value: WALLET_TYPES.KEYSTORE,
54export default function Wallet() {
55 const history = useHistory();
56 const { setWallet, walletType, setWalletType } = useWallet();
58 // reset wallet when this component is mounted
59 useLifecycle(() => setWallet(Maybe.Nothing()));
63 <H1>Unlock a Wallet</H1>
66 To manage your assets, you need to unlock a wallet. Please select how
67 you would like to access your wallet.
72 options={kWalletOptions}
73 handleUpdate={setWalletType}
74 currentSelectionTitle={renderWalletType(walletType)}
80 walletType === WALLET_TYPES.MNEMONIC
81 ? ROUTE_NAMES.MNEMONIC
82 : walletType === WALLET_TYPES.TICKET
84 : walletType === WALLET_TYPES.SHARDS
86 : walletType === WALLET_TYPES.LEDGER
88 : walletType === WALLET_TYPES.TREZOR
90 : walletType === WALLET_TYPES.PRIVATE_KEY
91 ? ROUTE_NAMES.PRIVATE_KEY
92 : walletType === WALLET_TYPES.KEYSTORE
93 ? ROUTE_NAMES.KEYSTORE
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