diff --git a/packages/adena-extension/src/components/molecules/select-account-box/select-account-box-item.tsx b/packages/adena-extension/src/components/molecules/select-account-box/select-account-box-item.tsx index 9ee57dfc..12808bdb 100644 --- a/packages/adena-extension/src/components/molecules/select-account-box/select-account-box-item.tsx +++ b/packages/adena-extension/src/components/molecules/select-account-box/select-account-box-item.tsx @@ -1,4 +1,3 @@ -import { formatAddress } from '@common/utils/client-utils'; import { Row, WebCheckBox, WebText } from '@components/atoms'; import React from 'react'; import { useTheme } from 'styled-components'; @@ -15,7 +14,7 @@ const SelectAccountBoxItem: React.FC<{ return ( - {formatAddress(address)} + {address} {`m/44'/118'/0'/0/${hdPath}`} {stored ? ( diff --git a/packages/adena-extension/src/hooks/web/use-account-add-screen.ts b/packages/adena-extension/src/hooks/web/use-account-add-screen.ts index 5572bf31..117e8a85 100644 --- a/packages/adena-extension/src/hooks/web/use-account-add-screen.ts +++ b/packages/adena-extension/src/hooks/web/use-account-add-screen.ts @@ -30,7 +30,7 @@ export type UseAccountAddScreenReturn = { export type AccountAddStateType = 'INIT' | 'SELECT_SEED_PHRASE' | 'CREATE_ACCOUNT'; const useAccountAddScreen = (): UseAccountAddScreenReturn => { - const { navigate, params } = useAppNavigate(); + const { navigate } = useAppNavigate(); const { ableToSkipQuestionnaire } = useQuestionnaire(); const { wallet, updateWallet } = useWalletContext(); const { changeCurrentAccount } = useCurrentAccount(); @@ -42,13 +42,19 @@ const useAccountAddScreen = (): UseAccountAddScreenReturn => { return wallet.keyrings.filter(isHDWalletKeyring).length > 1; }, [wallet]); - const [step, setStep] = useState( - params?.doneQuestionnaire - ? hasMultiSeedPhrase - ? 'CREATE_ACCOUNT' - : 'SELECT_SEED_PHRASE' - : 'INIT', - ); + const getInitializeStep = (): AccountAddStateType => { + if (!wallet) { + return 'INIT'; + } + + if (hasMultiSeedPhrase) { + return 'SELECT_SEED_PHRASE'; + } + + return 'CREATE_ACCOUNT'; + }; + + const [step, setStep] = useState(getInitializeStep()); const accountAddStepNo = hasMultiSeedPhrase ? { @@ -87,6 +93,10 @@ const useAccountAddScreen = (): UseAccountAddScreenReturn => { break; case 'SELECT_SEED_PHRASE': case 'CREATE_ACCOUNT': + if (wallet) { + navigate(RoutePath.WebAdvancedOption); + break; + } setStep('INIT'); break; default: diff --git a/packages/adena-extension/src/hooks/web/use-account-import-screen.ts b/packages/adena-extension/src/hooks/web/use-account-import-screen.ts index 9a959f81..54783e3a 100644 --- a/packages/adena-extension/src/hooks/web/use-account-import-screen.ts +++ b/packages/adena-extension/src/hooks/web/use-account-import-screen.ts @@ -221,9 +221,11 @@ const useAccountImportScreen = ({ wallet }: { wallet: Wallet }): UseAccountImpor } }, [ step, + wallet, inputType, inputValue, selectedAddresses, + loadedAccounts, ableToSkipQuestionnaire, makePrivateKeyAccountAndKeyring, ]); diff --git a/packages/adena-extension/src/pages/web/account-add-screen/index.tsx b/packages/adena-extension/src/pages/web/account-add-screen/index.tsx index dd1df31c..ef0acc51 100644 --- a/packages/adena-extension/src/pages/web/account-add-screen/index.tsx +++ b/packages/adena-extension/src/pages/web/account-add-screen/index.tsx @@ -5,7 +5,7 @@ import { WebMainHeader } from '@components/pages/web/main-header'; import useAccountAddScreen from '@hooks/web/use-account-add-screen'; import { ADENA_DOCS_PAGE } from '@common/constants/resource.constant'; -import { WEB_TOP_SPACING, WEB_TOP_SPACING_RESPONSIVE } from '@common/constants/ui.constant'; +import { WEB_TOP_SPACING } from '@common/constants/ui.constant'; import SensitiveInfoStep from '@components/pages/web/sensitive-info-step'; import CreateAccountStep from './create-account-step'; import SelectSeedPhraseStep from './select-seed-phrase-step'; @@ -20,7 +20,7 @@ const AccountAddScreen = (): ReactElement => { if (step === 'INIT') { return { default: WEB_TOP_SPACING, - responsive: WEB_TOP_SPACING_RESPONSIVE, + responsive: WEB_TOP_SPACING, }; } return null;