diff --git a/apps/extension/src/ui/apps/dashboard/routes/AccountAdd/AccountAddDerivedPage.tsx b/apps/extension/src/ui/apps/dashboard/routes/AccountAdd/AccountAddDerivedPage.tsx index dbfd4d110..3315245c0 100644 --- a/apps/extension/src/ui/apps/dashboard/routes/AccountAdd/AccountAddDerivedPage.tsx +++ b/apps/extension/src/ui/apps/dashboard/routes/AccountAdd/AccountAddDerivedPage.tsx @@ -15,10 +15,21 @@ const Content = () => { const urlParamType = (params.get("type") ?? undefined) as AccountAddressType | undefined const { setAddress } = useSelectAccountAndNavigate("/portfolio") + const accountTypeString = () => { + switch (urlParamType) { + case "ethereum": + return " Ethereum" + case "sr25519": + return " Polkadot" + default: + return "" + } + } + return ( <> diff --git a/apps/extension/src/ui/apps/dashboard/routes/AccountAdd/AccountAddWatchedPage.tsx b/apps/extension/src/ui/apps/dashboard/routes/AccountAdd/AccountAddWatchedPage.tsx index 403a06401..fb9fab8f9 100644 --- a/apps/extension/src/ui/apps/dashboard/routes/AccountAdd/AccountAddWatchedPage.tsx +++ b/apps/extension/src/ui/apps/dashboard/routes/AccountAdd/AccountAddWatchedPage.tsx @@ -15,10 +15,21 @@ export const Content = () => { const urlParamType = (params.get("type") ?? undefined) as AccountAddressType | undefined const { setAddress } = useSelectAccountAndNavigate("/portfolio") + const accountTypeString = () => { + switch (urlParamType) { + case "ethereum": + return " Ethereum" + case "sr25519": + return " Polkadot" + default: + return "" + } + } + return ( <> diff --git a/apps/extension/src/ui/domains/Account/AccountAdd/AccountAddDerived/AccountAddDerivedForm.tsx b/apps/extension/src/ui/domains/Account/AccountAdd/AccountAddDerived/AccountAddDerivedForm.tsx index 5344c7100..41a896544 100644 --- a/apps/extension/src/ui/domains/Account/AccountAdd/AccountAddDerived/AccountAddDerivedForm.tsx +++ b/apps/extension/src/ui/domains/Account/AccountAdd/AccountAddDerived/AccountAddDerivedForm.tsx @@ -102,7 +102,6 @@ const AccountAddDerivedFormInner: FC = ({ onSuccess }) => { // get type paramter from url const [params] = useSearchParams() const urlParamType = (params.get("type") ?? undefined) as UiAccountAddressType | undefined - const disableOtherTypes = params.has("disableOtherTypes") const mnemonics = useMnemonics() const allAccounts = useAccounts() const accountNames = useMemo(() => allAccounts.map((a) => a.name), [allAccounts]) @@ -255,11 +254,9 @@ const AccountAddDerivedFormInner: FC = ({ onSuccess }) => { return (
- + {!urlParamType && ( + + )}
{!!mnemonics.length && ( diff --git a/apps/extension/src/ui/domains/Account/AccountAdd/AccountAddWatchedForm.tsx b/apps/extension/src/ui/domains/Account/AccountAdd/AccountAddWatchedForm.tsx index 0ec067acd..4365325f5 100644 --- a/apps/extension/src/ui/domains/Account/AccountAdd/AccountAddWatchedForm.tsx +++ b/apps/extension/src/ui/domains/Account/AccountAdd/AccountAddWatchedForm.tsx @@ -25,7 +25,6 @@ export const AccountAddWatchedForm = ({ onSuccess }: AccountAddPageProps) => { // get type paramter from url const [params] = useSearchParams() const urlParamType = (params.get("type") ?? undefined) as UiAccountAddressType | undefined - const disableOtherTypes = params.has("disableOtherTypes") const allAccounts = useAccounts() const accountNames = useMemo(() => allAccounts.map((a) => a.name), [allAccounts]) @@ -152,11 +151,9 @@ export const AccountAddWatchedForm = ({ onSuccess }: AccountAddPageProps) => { return (
- + {!urlParamType && ( + + )}

diff --git a/apps/extension/src/ui/domains/Account/AccountAdd/Container.tsx b/apps/extension/src/ui/domains/Account/AccountAdd/Container.tsx index 5a336a4ad..366fe644d 100644 --- a/apps/extension/src/ui/domains/Account/AccountAdd/Container.tsx +++ b/apps/extension/src/ui/domains/Account/AccountAdd/Container.tsx @@ -121,7 +121,7 @@ function NewAccountMethodButtons() { /> } type="ethereum" - to={`/accounts/add/derived?type=ethereum${accountType ? "&disableOtherTypes" : ""}`} + to={`/accounts/add/derived?type=ethereum`} /> } type="polkadot" - to={`/accounts/add/derived?type=sr25519${accountType ? "&disableOtherTypes" : ""}`} + to={`/accounts/add/derived?type=sr25519`} /> ) @@ -218,7 +218,7 @@ function WatchedAccountMethodButtons() { /> } type="ethereum" - to={`/accounts/add/watched?type=ethereum${accountType ? "&disableOtherTypes" : ""}`} + to={`/accounts/add/watched?type=ethereum`} /> } type="polkadot" - to={`/accounts/add/watched?type=sr25519${accountType ? "&disableOtherTypes" : ""}`} + to={`/accounts/add/watched?type=sr25519`} /> ) diff --git a/apps/extension/src/ui/domains/Account/AccountTypeSelector.tsx b/apps/extension/src/ui/domains/Account/AccountTypeSelector.tsx index e082b8a40..082f7df7f 100644 --- a/apps/extension/src/ui/domains/Account/AccountTypeSelector.tsx +++ b/apps/extension/src/ui/domains/Account/AccountTypeSelector.tsx @@ -34,14 +34,12 @@ const AccountTypeButton: FC<{ type AccountTypeSelectorProps = { defaultType?: UiAccountAddressType - disableOtherTypes?: boolean onChange: (type: UiAccountAddressType) => void className?: string } export const AccountTypeSelector = ({ defaultType, - disableOtherTypes, onChange, className, }: AccountTypeSelectorProps) => { @@ -70,7 +68,6 @@ export const AccountTypeSelector = ({ {t("Ethereum, Base, zkSync, Arbitrum, BSC, and all EVM chains")}

} - disabled={disableOtherTypes && defaultType !== "ethereum"} onClick={handleClick("ethereum")} /> } - disabled={disableOtherTypes && defaultType !== "sr25519"} onClick={handleClick("sr25519")} />