@@ -2,7 +2,12 @@ import React from 'react';
22import { Input, AccessoryIcon } from 'indigo-react';
33import { useField } from 'react-final-form';
44
5−import { prependSig, convertToNumber } from 'lib/transformers';
5+import {
6+ prependSig,
7+ convertToNumber,
8+ buildFormatter,
9+ downcase,
10+} from 'form/formatters';
611import { DEFAULT_HD_PATH } from 'lib/wallet';
712import InputSigil from 'components/InputSigil';
813
@@ -16,6 +21,8 @@ const PLACEHOLDER_PRIVATE_KEY =
1621 '0x12345abcdee6beb2f323fab48b432925c9785808d33a6ca6d7ba00b45e9370c3';
1722const PLACEHOLDER_EMAIL = 'Email Address';
1823
24+const formatPat = buildFormatter([downcase, prependSig]);
25+
1926export function TicketInput({ name, ...rest }) {
2027 const {
2128 meta: { valid, error, validating, touched, active },
@@ -43,7 +50,7 @@ export function TicketInput({ name, ...rest }) {
4350 <AccessoryIcon.Success />
4451 ) : null
4552 }
46− config={{ format: prependSig }}
53+ config={{ format: formatPat }}
4754 mono
4855 {...rest}
4956 />
@@ -103,7 +110,7 @@ export function PointInput({ name, size = 4, ...rest }) {
103110 />
104111 ) : null
105112 }
106− config={{ format: prependSig }}
113+ config={{ format: formatPat }}
107114 mono
108115 {...rest}
109116 />