diff --git a/packages/page-accounts/src/modals/Derive.tsx b/packages/page-accounts/src/modals/Derive.tsx
index 1b4cdecb40..c7cce325fd 100644
--- a/packages/page-accounts/src/modals/Derive.tsx
+++ b/packages/page-accounts/src/modals/Derive.tsx
@@ -33,6 +33,10 @@ interface LockState {
}
function deriveValidate (suri: string, pairType: KeypairType): string | null {
+ if (suri.includes('///')) {
+ return 'Password paths are not supported on keys derived from others';
+ }
+
try {
const { path } = keyExtractPath(suri);
@@ -41,6 +45,8 @@ function deriveValidate (suri: string, pairType: KeypairType): string | null {
return 'Soft derivation paths are not allowed on ed25519';
}
} catch (error) {
+ console.error(error);
+
return (error as Error).message;
}
@@ -216,11 +222,14 @@ function Derive ({ className = '', from, onClose }: Props): React.ReactElement {
{sourceStatic}
('You can set a custom derivation path for this account using the following syntax "//////". The "/" and "//" may be repeated and mixed`. The "///password" is optional and should only occur once.')}
+ help={t('You can set a custom derivation path for this account using the following syntax "//////". The "/" and "//" may be repeated and mixed`.')}
label={t('derivation path')}
onChange={setSuri}
placeholder={t('//hard/soft')}
/>
+ {deriveError && (
+ {deriveError}
+ )}
('Name given to this account. You can edit it. To use the account to validate or nominate, it is a good practice to append the function of the account in the name, e.g "name_you_want - stash".')}