1import React from 'react';
2import { Input, AccessoryIcon } from 'indigo-react';
3import { useField } from 'react-final-form';
10} from 'form/formatters';
11import { DEFAULT_HD_PATH } from 'lib/wallet';
12import InputSigil from 'components/InputSigil';
14const PLACEHOLDER_POINT = '~sampel-ponnym';
15const PLACEHOLDER_HD_PATH = DEFAULT_HD_PATH;
16const PLACEHOLDER_MNEMONIC =
17 'example crew supreme gesture quantum web media hazard theory mercy wing kitten';
18const PLACEHOLDER_TICKET = '~sampel-ticlyt-migfun-falmel';
19const PLACEHOLDER_ADDRESS = '0x12345abcdeDB11D175F123F6891AA64F01c24F7d';
20const PLACEHOLDER_PRIVATE_KEY =
21 '0x12345abcdee6beb2f323fab48b432925c9785808d33a6ca6d7ba00b45e9370c3';
22const PLACEHOLDER_EMAIL = 'Email Address';
24const formatPat = buildFormatter([downcase, prependSig]);
26export function TicketInput({ name, ...rest }) {
28 meta: { valid, error, validating, touched, active },
43 placeholder={PLACEHOLDER_TICKET}
45 touched && !active && error ? (
46 <AccessoryIcon.Failure />
48 <AccessoryIcon.Pending />
50 <AccessoryIcon.Success />
53 config={{ format: formatPat }}
60export function MnemonicInput({ ...rest }) {
62 <Input type="textarea" placeholder={PLACEHOLDER_MNEMONIC} mono {...rest} />
66export function HdPathInput({ ...rest }) {
70 placeholder={PLACEHOLDER_HD_PATH}
77export function PassphraseInput({ ...rest }) {
81 placeholder="Passphrase"
88export function PointInput({ name, size = 4, ...rest }) {
91 meta: { active, valid, error },
93 subscription: { value: true, active: true, valid: true, error: true },
101 placeholder={PLACEHOLDER_POINT}
113 config={{ format: formatPat }}
120export function HexInput({ ...rest }) {
124 placeholder={PLACEHOLDER_PRIVATE_KEY}
132export function AddressInput({ ...rest }) {
136 placeholder={PLACEHOLDER_ADDRESS}
144export function NumberInput({ ...rest }) {
150 config={{ format: convertToNumber }}
156export function EmailInput({ ...rest }) {
160 placeholder={PLACEHOLDER_EMAIL}
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