Fix eth privkey account addition UI (#4757)
* fix warnings and disable derivation path * apply review feedbacl
This commit is contained in:
parent
a5c0134c30
commit
866dcf3e86
@ -393,8 +393,9 @@ function Create ({ className = '', onClose, onStatusChange, seed: propsSeed, typ
|
||||
: (
|
||||
<Modal.Columns>
|
||||
<Modal.Column>
|
||||
<Input
|
||||
help={t<string>('You can set a custom derivation path for this account using the following syntax "/<soft-key>//<hard-key>". The "/<soft-key>" and "//<hard-key>" may be repeated and mixed`. An optional "///<password>" can be used with a mnemonic seed, and may only be specified once.')}
|
||||
{(pairType !== 'ethereum' || seedType !== 'raw') && (<Input
|
||||
help={(pairType === 'ethereum' ? t<string>('You can set a custom derivation path for this account using the following syntax "m/<purpose>/<coin_type>/<account>/<change>/<address_index>') : t<string>('You can set a custom derivation path for this account using the following syntax "/<soft-key>//<hard-key>". The "/<soft-key>" and "//<hard-key>" may be repeated and mixed`. An optional "///<password>" can be used with a mnemonic seed, and may only be specified once.'))}
|
||||
isDisabled={pairType === 'ethereum' && seedType === 'raw'}
|
||||
isError={!!deriveValidation?.error}
|
||||
label={t<string>('secret derivation path')}
|
||||
onChange={_onChangePath}
|
||||
@ -411,7 +412,7 @@ function Create ({ className = '', onClose, onStatusChange, seed: propsSeed, typ
|
||||
}
|
||||
tabIndex={-1}
|
||||
value={derivePath}
|
||||
/>
|
||||
/>)}
|
||||
{deriveValidation?.error && (
|
||||
<MarkError content={errorIndex.current[deriveValidation.error] || deriveValidation.error} />
|
||||
)}
|
||||
@ -420,7 +421,7 @@ function Create ({ className = '', onClose, onStatusChange, seed: propsSeed, typ
|
||||
)}
|
||||
</Modal.Column>
|
||||
<Modal.Column>
|
||||
<p>{t<string>('The derivation path allows you to create different accounts from the same base mnemonic.')}</p>
|
||||
<p>{pairType === 'ethereum' && seedType === 'raw' ? t<string>('The derivation path is only relevant when deriving keys from a mnemonic.') : t<string>('The derivation path allows you to create different accounts from the same base mnemonic.')}</p>
|
||||
</Modal.Column>
|
||||
</Modal.Columns>
|
||||
)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user