import React, { FC, HTMLAttributes } from 'react'; import TextField from '@material-ui/core/TextField'; import Grid from '@material-ui/core/Grid'; import { LinkedDataIdentifier } from '../LinkedDataIdentifier'; export interface Props extends HTMLAttributes { setDialogState?: any; passwordToKey: any; seedToId: any; } export const CapturePasswordDialogContent: FC = ({ setDialogState, passwordToKey, seedToId, }) => { const [seedId, setSeedId] = React.useState(''); const handlePasswordChange = async (event: any) => { const password = event.target.value; const seed = await passwordToKey(password); let seedId = await seedToId(seed); setSeedId(seedId); setDialogState({ seedId, seed: Buffer.from(seed).toString('hex'), password: password, }); }; return (
{ handlePasswordChange(event); }} />
); };