1import React, { useState, useMemo } from 'react';
3import useBreakpoints from 'lib/useBreakpoints';
5import Accordion from 'components/Accordion';
7import PrivateKey from './PrivateKey';
8import Keystore from './Keystore';
9import Ledger from './Ledger';
10import Metamask from './Metamask';
11import Trezor from './Trezor';
12import Mnemonic from './Mnemonic';
15 PRIVATE_KEY: 'PRIVATE_KEY',
24 [NAMES.PRIVATE_KEY]: PrivateKey,
25 [NAMES.KEYSTORE]: Keystore,
26 [NAMES.LEDGER]: Ledger,
27 [NAMES.TREZOR]: Trezor,
28 [NAMES.METAMASK]: Metamask,
29 [NAMES.MNEMONIC]: Mnemonic,
33 { text: 'Mnemonic (BIP 39)', value: NAMES.MNEMONIC },
34 { text: 'Ledger', value: NAMES.LEDGER },
35 { text: 'Trezor', value: NAMES.TREZOR },
36 { text: 'Metamask', value: NAMES.METAMASK },
37 { text: 'Ethereum Private Key', value: NAMES.PRIVATE_KEY },
38 { text: 'Ethereum Keystore', value: NAMES.KEYSTORE },
41const isHardware = name => !![NAMES.TREZOR, NAMES.LEDGER].find(n => n === name);
43export default function Other({ className, ...rest }) {
44 const [currentTab, setCurrentTab] = useState(undefined);
46 const hardwareAllowed = useBreakpoints([false, true, true]);
47 const options = useMemo(
52 : { ...o, disabled: !hardwareAllowed && ' not available on mobile' }
61 currentTab={currentTab}
62 onTabChange={setCurrentTab}
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