update stronghold

This commit is contained in:
Ren Amamiya
2023-07-20 08:57:58 +07:00
parent a80477b40e
commit bbfdb139c6
16 changed files with 74 additions and 127 deletions

View File

@@ -33,13 +33,10 @@ const resolver: Resolver<FormValues> = async (values) => {
export function MigrateScreen() {
const queryClient = useQueryClient();
const navigate = useNavigate();
const setPrivkey = useStronghold((state) => state.setPrivkey);
const [passwordInput, setPasswordInput] = useState('password');
const [loading, setLoading] = useState(false);
const [setPassword, setPrivkey] = useStronghold((state) => [
state.setPassword,
state.setPrivkey,
]);
const { account } = useAccount();
const { save } = useSecureStorage();
@@ -63,9 +60,6 @@ export function MigrateScreen() {
const onSubmit = async (data: { [x: string]: string }) => {
setLoading(true);
if (data.password.length > 3) {
// add password to local state
setPassword(data.password);
// load private in secure storage
try {
// save privkey to secure storage