on master help sign in
fix: remove e.g. from placeholders
commit3e184c3f22b0240552a8755eff685f653d14132a authorMatt Condon (shrugs) <mattgcondon@gmail.com> dateTue 23 Jul 2019, 13:55 (7 years ago) parentb529677
1 file changed+12−8
src/lib/useInputs.js+12−8
src/lib/useInputs.js+12−8
@@ -22,7 +22,12 @@ import { prependSig, convertToNumber } from 'lib/transformers';
2222
2323import InputSigil from 'components/InputSigil';
2424
25−const EXAMPLE_PRIVATE_KEY =
25+const PLACEHOLDER_POINT = '~zod';
26+const PLACEHOLDER_HD_PATH = DEFAULT_HD_PATH;
27+const PLACEHOLDER_MNEMONIC = bip39.generateMnemonic();
28+const PLACEHOLDER_TICKET = '~ragtyd-modwen-bostec-hinsep';
29+const PLACEHOLDER_ADDRESS = '0x6DEfFb0caFDB11D175F123F6891AA64F01c24F7d';
30+const PLACEHOLDER_PRIVATE_KEY =
2631 '0xa44de2416ee6beb2f323fab48b432925c9785808d33a6ca6d7ba00b45e9370c3';
2732
2833// pulls out the first input from a useForm() call
@@ -71,7 +76,7 @@ export function useHexInput({ length, ...rest }) {
7176 {
7277 type: 'text', // or password
7378 autoComplete: 'off',
74− placeholder: `e.g. ${EXAMPLE_PRIVATE_KEY}`,
79+ placeholder: PLACEHOLDER_PRIVATE_KEY,
7580 validators: useMemo(
7681 () => [
7782 validateHexString,
@@ -86,7 +91,6 @@ export function useHexInput({ length, ...rest }) {
8691 );
8792}
8893
89−const kExampleMnemonic = bip39.generateMnemonic();
9094const kMnemonicValidators = [validateMnemonic, validateNotEmpty];
9195export function useMnemonicInput(props) {
9296 return useFirstOf(
@@ -94,7 +98,7 @@ export function useMnemonicInput(props) {
9498 {
9599 type: 'text',
96100 autoComplete: 'off',
97− placeholder: `e.g. ${kExampleMnemonic}`,
101+ placeholder: PLACEHOLDER_MNEMONIC,
98102 validators: kMnemonicValidators,
99103 ...props,
100104 },
@@ -108,7 +112,7 @@ export function useHdPathInput(props) {
108112 {
109113 type: 'text',
110114 autoComplete: 'off',
111− placeholder: `e.g. ${DEFAULT_HD_PATH}`,
115+ placeholder: PLACEHOLDER_HD_PATH,
112116 ...props,
113117 },
114118 ])
@@ -124,7 +128,7 @@ export function useTicketInput({ validators = [], deriving = false, ...rest }) {
124128 {
125129 type: 'password',
126130 label: 'Ticket',
127− placeholder: 'e.g. ~ragtyd-modwen-bostec-hinsep',
131+ placeholder: PLACEHOLDER_TICKET,
128132 validators: useMemo(() => [...validators, ...kTicketValidators], [
129133 validators,
130134 ]),
@@ -162,7 +166,7 @@ export function usePointInput({ size = 4, validators = [], ...rest }) {
162166 {
163167 type: 'text',
164168 label: 'Point',
165− placeholder: 'e.g. ~zod',
169+ placeholder: PLACEHOLDER_POINT,
166170 validators: _validators,
167171 transformers: kPointTransformers,
168172 mono: true,
@@ -236,7 +240,7 @@ export function useAddressInput({ ...rest }) {
236240 {
237241 type: 'string',
238242 label: 'Ethereum Address',
239− placeholder: 'e.g. 0x6DEfFb0caFDB11D175F123F6891AA64F01c24F7d',
243+ placeholder: PLACEHOLDER_ADDRESS,
240244 autoComplete: 'off',
241245 validators: kAddressValidators,
242246 mono: true,