1import React, { useCallback, useMemo } from 'react';
2import { Input } from 'indigo-react';
4import { useTicketInput } from 'lib/useInputs';
5import { useLocalRouter } from 'lib/LocalRouter';
6import { validateExactly } from 'lib/validators';
8import View from 'components/View';
9import { ForwardButton } from 'components/Buttons';
11const STUB_VERIFY_TICKET = process.env.NODE_ENV === 'development';
13//TODO deduplicate with PassportVerify
14export default function Verify({ newWallet }) {
15 const { push, names } = useLocalRouter();
17 const ticket = newWallet.value.wallet.ticket;
18 const validators = useMemo(
19 () => [validateExactly(ticket, 'Does not match expected master ticket.')],
22 const [ticketInput, { pass }] = useTicketInput({
24 label: 'New master ticket',
25 initialValue: STUB_VERIFY_TICKET ? ticket : undefined,
30 const next = useCallback(() => push(names.RETICKET), [push, names]);
34 Prove that you downloaded the new secrets!
35 <Input {...ticketInput} />
36 <ForwardButton disabled={!pass} onClick={next}>
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