1import React from 'react';
2import { Input } from 'indigo-react';
3import * as bip39 from 'bip39';
5import InputSigil from 'components/InputSigil';
7import { DEFAULT_HD_PATH } from 'lib/wallet';
13} from 'lib/validators';
14import { prependSig } from 'lib/transformers';
16const kExampleMnemonic = bip39.generateMnemonic();
18// const RequiredInput = advancedInput({
19// WrappedComponent: Input,
20// validators: [validateNotEmpty],
23// const NetworkKeyInput = advancedInput({
24// WrappedComponent: Input,
25// validators: [validateNotEmpty, validateNetworkKey],
28// const NetworkSeedInput = advancedInput({
29// WrappedComponent: Input,
30// validators: [validateNotEmpty, validateNetworkSeed],
33// const AddressInput = advancedInput({
34// WrappedComponent: Input,
35// validators: [validateEthereumAddress, validateNotEmpty],
38export function PassphraseInput(props) {
43 placeholder="Passphrase"
49export function MnemonicInput(props) {
54 placeholder={`e.g. ${kExampleMnemonic}`}
55 validators={[validateMnemonic, validateNotEmpty]}
61export function HdPathInput(props) {
66 placeholder={`${DEFAULT_HD_PATH}`}
67 validators={[validateNotEmpty]}
73// const GalaxyInput = advancedInput({
74// WrappedComponent: Input,
75// validators: [validateGalaxy, validateNotEmpty],
76// transformers: [prependSig],
79export function PointInput(props) {
83 placeholder="e.g. ~zod"
84 initialValue={props.initialValue || '~'}
85 validators={[validatePoint, validateNotEmpty]}
86 transformers={[prependSig]}
90 patp={props.initialValue || '~'}
94 onPass={props.setPass}
95 focused={props.focused}
96 onFocus={props.setFocused}
98 onError={props.setError}
106//TODO needs to be fancier, displaying sig and dashes instead of •ing all
107export function TicketInput(props) {
111 placeholder="~master-ticket"
112 validators={[validateTicket, validateNotEmpty]}
113 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