Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ui/components/password/PasswordTextarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ const PasswordTextarea = ({
// The actual textarea styling
'& .MuiInputBase-input': {
padding: '20px',
paddingRight: '40px',
resize: 'none',
fontSize: '16px',
fontFamily: 'Inter',
fontWeight: 400,
color: '#fff',

WebkitTextSecurity: showPassword ? 'none' : 'disc',
'&::placeholder': {
color: '#767676',
Expand Down
19 changes: 15 additions & 4 deletions src/ui/views/Welcome/import-profile/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Alert, Snackbar } from '@mui/material';
import React, { useEffect, useReducer } from 'react';
import { useNavigate } from 'react-router';
import { useLocation, useNavigate } from 'react-router';

import {
IMPORT_STEPS,
Expand All @@ -27,6 +27,7 @@ export const initImportProfileState = (initialState: ImportState): ImportState =

const ImportProfile = () => {
const navigate = useNavigate();
const location = useLocation();
const usewallet = useWallet();

const [state, dispatch] = useReducer(importProfileReducer, INITIAL_IMPORT_STATE);
Expand Down Expand Up @@ -107,8 +108,14 @@ const ImportProfile = () => {
};

const goBack = () => {
if (activeTab === IMPORT_STEPS.GOOGLE_BACKUP || activeTab === IMPORT_STEPS.ALL_SET) {
navigate(-1);
if (
activeTab === IMPORT_STEPS.GOOGLE_BACKUP ||
activeTab === IMPORT_STEPS.ALL_SET ||
activeTab === IMPORT_STEPS.IMPORT
) {
if (location.key !== 'default') {
navigate(-1);
}
return;
Comment on lines +111 to 119

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return statement is placed after the closing brace of the if block, making it unconditional. This means the function will always return regardless of the conditions, potentially preventing the dispatch({ type: 'GO_BACK' }) from ever being called. Consider moving the return statement inside the nested if block.

}
dispatch({ type: 'GO_BACK' });
Expand All @@ -131,11 +138,15 @@ const ImportProfile = () => {
/>
);
}

const showBackButton =
activeTab !== IMPORT_STEPS.ALL_SET &&
(activeTab !== IMPORT_STEPS.IMPORT || location.key !== 'default');
return (
<LandingComponents
activeIndex={Object.values(IMPORT_STEPS).indexOf(activeTab)}
direction="right"
showBackButton={activeTab !== IMPORT_STEPS.ALL_SET && activeTab !== IMPORT_STEPS.IMPORT}
showBackButton={showBackButton}
onBack={goBack}
showConfetti={activeTab === IMPORT_STEPS.ALL_SET}
showRegisterHeader={true}
Expand Down
Loading