Skip to content

Commit

Permalink
[Issue-1826] Implement Export Account
Browse files Browse the repository at this point in the history
  • Loading branch information
dominhquang committed Nov 4, 2024
1 parent 50d8bb4 commit 7d34d32
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/screens/Account/ImportSecretPhrase/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import createStyle from './styles';
import { AccountProxyType, ResponseMnemonicValidateV2 } from '@subwallet/extension-base/types';
import { AppModalContext } from 'providers/AppModalContext';
import { AccountNameModal } from 'components/Modal/AccountNameModal';
import { useToast } from 'react-native-toast-notifications';
const secretPhraseFormConfig: FormControlConfig = {
seed: {
name: '',
Expand All @@ -31,6 +32,7 @@ export const ImportSecretPhrase = () => {
const goHome = useGoHome();
const { confirmModal } = useContext(AppModalContext);
const { onPress: onPressSubmit } = useUnlockModal(navigation);
const toast = useToast();

const styles = useMemo(() => createStyle(theme), [theme]);
const [accountNameModalVisible, setAccountNameModalVisible] = useState<boolean>(false);
Expand Down Expand Up @@ -107,7 +109,9 @@ export const ImportSecretPhrase = () => {
routes: [{ name: 'Home' }],
});
})
.catch(() => {
.catch((e: Error) => {
toast.hideAll();
toast.show(e.message, { type: 'danger' });
setAccountCreating(false);
});
};
Expand Down

0 comments on commit 7d34d32

Please sign in to comment.