1import React from 'react';
2import { Input } from 'indigo-react';
3import * as bip39 from 'bip39';
5import { DEFAULT_HD_PATH } from 'lib/wallet';
11} from 'lib/validators';
12import { prependSig } from 'lib/transformers';
14const kExampleMnemonic = bip39.generateMnemonic();
16// const RequiredInput = advancedInput({
17// WrappedComponent: Input,
18// validators: [validateNotEmpty],
21// const NetworkKeyInput = advancedInput({
22// WrappedComponent: Input,
23// validators: [validateNotEmpty, validateNetworkKey],
26// const NetworkSeedInput = advancedInput({
27// WrappedComponent: Input,
28// validators: [validateNotEmpty, validateNetworkSeed],
31// const AddressInput = advancedInput({
32// WrappedComponent: Input,
33// validators: [validateEthereumAddress, validateNotEmpty],
36export function PassphraseInput(props) {
41 placeholder="Passphrase"
47export function MnemonicInput(props) {
52 placeholder={`e.g. ${kExampleMnemonic}`}
53 validators={[validateMnemonic, validateNotEmpty]}
59export function HdPathInput(props) {
64 placeholder={`${DEFAULT_HD_PATH}`}
65 validators={[validateNotEmpty]}
71// const GalaxyInput = advancedInput({
72// WrappedComponent: Input,
73// validators: [validateGalaxy, validateNotEmpty],
74// transformers: [prependSig],
77export function PointInput(props) {
81 placeholder="e.g. ~zod"
82 initialValue={props.initialValue || '~'}
83 validators={[validatePoint, validateNotEmpty]}
84 transformers={[prependSig]}
91//TODO needs to be fancier, displaying sig and dashes instead of •ing all
92export function TicketInput(props) {
96 placeholder="~master-ticket"
97 validators={[validateTicket, validateNotEmpty]}
98 transformers={[prependSig]}
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