diff --git a/nym-wallet/src/components/Accounts/AddAccountModal.tsx b/nym-wallet/src/components/Accounts/AddAccountModal.tsx
index 9c4bea6ca4..60d1963618 100644
--- a/nym-wallet/src/components/Accounts/AddAccountModal.tsx
+++ b/nym-wallet/src/components/Accounts/AddAccountModal.tsx
@@ -12,7 +12,10 @@ import {
TextField,
Typography,
} from '@mui/material';
-import { Add, Close } from '@mui/icons-material';
+import { Check, Close, ContentCopySharp } from '@mui/icons-material';
+import { useClipboard } from 'use-clipboard-copy';
+
+const createAccountSteps = ['Save and copy mnemonic for your new account', 'Name your new account'];
const passwordCreationSteps = [
'Log out',
@@ -22,21 +25,92 @@ const passwordCreationSteps = [
'Now you can create multiple accounts',
];
-const NoPassword = () => (
-
-
-
- You can’t add new accounts if your wallet doesn’t have a password.
-
- Follow steps below to create password.
-
- How to create password to your account
- {passwordCreationSteps.map((step, i) => (
- {`${i + 1}. ${step}`}
- ))}
-
+const NoPassword = ({ onClose }: { onClose: () => void }) => (
+
+
+
+
+
+ You can’t add new accounts if your wallet doesn’t have a password.
+
+ Follow steps below to create password.
+
+ How to create password to your account
+ {passwordCreationSteps.map((step, i) => (
+ {`${i + 1}. ${step}`}
+ ))}
+
+
+
+
+
+
);
+const MnemonicStep = ({ mnemonic, onSave }: { mnemonic: string; onSave: () => void }) => {
+ const { copy, copied } = useClipboard({ copiedTimeout: 5000 });
+ return (
+
+
+
+
+
+ Below is your 24 word mnemonic, make sure to store it in a safe place for accessing your wallet in the
+ future
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+const NameAccount = ({ onAdd }: { onAdd: (value: string) => void }) => {
+ const [value, setValue] = useState('');
+ return (
+
+
+ setValue(e.target.value)} fullWidth />
+
+
+
+
+
+ );
+};
+
export const AddAccountModal = ({
show,
withoutPassword,
@@ -48,11 +122,7 @@ export const AddAccountModal = ({
onClose: () => void;
onAdd: (accountName: string) => void;
}) => {
- const [accountName, setAccountName] = useState('');
-
- useEffect(() => {
- if (!show) setAccountName('');
- }, [show]);
+ const [step, setStep] = useState(0);
return (
);
};
diff --git a/nym-wallet/src/components/Accounts/index.tsx b/nym-wallet/src/components/Accounts/index.tsx
index 44c4bf8d85..ad3f635455 100644
--- a/nym-wallet/src/components/Accounts/index.tsx
+++ b/nym-wallet/src/components/Accounts/index.tsx
@@ -4,9 +4,9 @@ import { v4 as uuidv4 } from 'uuid';
import { TAccount } from 'src/types';
import { EditAccountModal } from './EditAccountModal';
import { AddAccountModal } from './AddAccountModal';
-import { AccountColor } from './AccountColor';
import { AccountsModal } from './AccountsModal';
import { ImportAccountModal } from './ImportAccountModal';
+import { AccountAvatar } from './AccountAvatar';
export type TDialog = 'Accounts' | 'Add' | 'Edit' | 'Import';
@@ -24,10 +24,9 @@ export const Accounts = ({ storedAccounts }: { storedAccounts: TAccount[] }) =>
return (
<>
}
+ startIcon={}
color="inherit"
onClick={() => setDialogToDisplay('Accounts')}
- size="large"
disableRipple
>
{selectedAccount.name}
@@ -50,7 +49,7 @@ export const Accounts = ({ storedAccounts }: { storedAccounts: TAccount[] }) =>
{
- setDialogToDisplay(undefined);
+ setDialogToDisplay('Accounts');
}}
onAdd={(name) => {
setAccounts((accs) => [...accs, { address: uuidv4(), name }]);
@@ -71,7 +70,7 @@ export const Accounts = ({ storedAccounts }: { storedAccounts: TAccount[] }) =>
setDialogToDisplay('Accounts')}
- onImport={(mnemonic) => {
+ onImport={() => {
setAccounts((accs) => [...accs, { name: 'New Account', address: uuidv4() }]);
setDialogToDisplay('Accounts');
}}