From 866dcf3e863cc4bfe51089abd7156ecf4d351ee2 Mon Sep 17 00:00:00 2001 From: Antoine Estienne Date: Thu, 4 Mar 2021 16:33:13 +0100 Subject: [PATCH] Fix eth privkey account addition UI (#4757) * fix warnings and disable derivation path * apply review feedbacl --- packages/page-accounts/src/modals/Create.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/page-accounts/src/modals/Create.tsx b/packages/page-accounts/src/modals/Create.tsx index 1180e929cf..ba2d6096a4 100644 --- a/packages/page-accounts/src/modals/Create.tsx +++ b/packages/page-accounts/src/modals/Create.tsx @@ -393,8 +393,9 @@ function Create ({ className = '', onClose, onStatusChange, seed: propsSeed, typ : ( - ('You can set a custom derivation path for this account using the following syntax "///". The "/" and "//" may be repeated and mixed`. An optional "///" can be used with a mnemonic seed, and may only be specified once.')} + {(pairType !== 'ethereum' || seedType !== 'raw') && (('You can set a custom derivation path for this account using the following syntax "m/////') : t('You can set a custom derivation path for this account using the following syntax "///". The "/" and "//" may be repeated and mixed`. An optional "///" can be used with a mnemonic seed, and may only be specified once.'))} + isDisabled={pairType === 'ethereum' && seedType === 'raw'} isError={!!deriveValidation?.error} label={t('secret derivation path')} onChange={_onChangePath} @@ -411,7 +412,7 @@ function Create ({ className = '', onClose, onStatusChange, seed: propsSeed, typ } tabIndex={-1} value={derivePath} - /> + />)} {deriveValidation?.error && ( )} @@ -420,7 +421,7 @@ function Create ({ className = '', onClose, onStatusChange, seed: propsSeed, typ )} -

{t('The derivation path allows you to create different accounts from the same base mnemonic.')}

+

{pairType === 'ethereum' && seedType === 'raw' ? t('The derivation path is only relevant when deriving keys from a mnemonic.') : t('The derivation path allows you to create different accounts from the same base mnemonic.')}

)}