mirror of
https://github.com/lumehq/lume.git
synced 2025-03-17 21:32:32 +01:00
update gh action and fix migrate page
This commit is contained in:
parent
2a4c3dd7c8
commit
c664b3e4a4
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
@ -17,16 +17,10 @@ jobs:
|
||||
settings:
|
||||
- platform: 'macos-latest'
|
||||
args: '--target universal-apple-darwin'
|
||||
- platform: 'macos-latest'
|
||||
args: '--target x86_64-apple-darwin'
|
||||
- platform: 'macos-latest'
|
||||
args: '--target aarch64-apple-darwin'
|
||||
- platform: 'ubuntu-20.04'
|
||||
args: ''
|
||||
- platform: 'windows-latest'
|
||||
args: '--target x86_64-pc-windows-msvc'
|
||||
- platform: 'windows-latest'
|
||||
args: '--target i686-pc-windows-msvc'
|
||||
runs-on: ${{ matrix.settings.platform }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { useQueryClient } from '@tanstack/react-query';
|
||||
import { useState } from 'react';
|
||||
import { Resolver, useForm } from 'react-hook-form';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
@ -30,6 +31,7 @@ const resolver: Resolver<FormValues> = async (values) => {
|
||||
};
|
||||
|
||||
export function MigrateScreen() {
|
||||
const queryClient = useQueryClient();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const [passwordInput, setPasswordInput] = useState('password');
|
||||
@ -76,6 +78,8 @@ export function MigrateScreen() {
|
||||
// load private in secure storage
|
||||
try {
|
||||
await save(account.pubkey, account.privkey, data.password);
|
||||
// clear cache
|
||||
await queryClient.invalidateQueries(['currentAccount']);
|
||||
// redirect to home
|
||||
navigate('/', { replace: true });
|
||||
} catch {
|
||||
|
Loading…
x
Reference in New Issue
Block a user