1import React, { useCallback, useMemo } from 'react';
2import { Input, Text, Grid } from 'indigo-react';
4import { ForwardButton } from 'components/Buttons';
6import { useTicketInput } from 'lib/useInputs';
7import { useLocalRouter } from 'lib/LocalRouter';
8import { validateExactly } from 'lib/validators';
9import { isDevelopment } from 'lib/flags';
11const STUB_VERIFY_TICKET = isDevelopment;
13export default function ReticketVerify({ newWallet }) {
14 const { push, names } = useLocalRouter();
16 const ticket = newWallet.value.wallet.ticket;
17 const validators = useMemo(
18 () => [validateExactly(ticket, 'Does not match expected master ticket.')],
21 const [ticketInput, { pass }] = useTicketInput({
23 label: 'New master ticket',
24 initialValue: STUB_VERIFY_TICKET ? ticket : undefined,
29 const goExecute = useCallback(() => push(names.EXECUTE), [push, names]);
32 <Grid gap={4} className="mt4">
33 <Grid.Item full as={Text}>
34 Verify New Master Ticket
36 <Grid.Item full as={Input} {...ticketInput} />
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