fix: add clear functions for keystore passwords
This commit is contained in:
parent
9ce057949c
commit
3d08e16662
|
@ -50,6 +50,16 @@ const KeystoreFiles = () => {
|
||||||
return '*'.repeat(passwordLength)
|
return '*'.repeat(passwordLength)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const clearEncryptedPasswordHandler = () => {
|
||||||
|
setEncryptedPassword('')
|
||||||
|
setDisplayEncryptedPassword('')
|
||||||
|
}
|
||||||
|
|
||||||
|
const clearConfirmEncryptedPasswordHandler = () => {
|
||||||
|
setConfirmEncryptedPassword('')
|
||||||
|
setDisplayConfirmEncryptedPassword('')
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<YStack space={'$4'}>
|
<YStack space={'$4'}>
|
||||||
<XStack space={'$2'} style={{ justifyContent: 'space-between', width: '100%' }}>
|
<XStack space={'$2'} style={{ justifyContent: 'space-between', width: '100%' }}>
|
||||||
|
@ -65,7 +75,7 @@ const KeystoreFiles = () => {
|
||||||
size={16}
|
size={16}
|
||||||
color="#A1ABBD"
|
color="#A1ABBD"
|
||||||
style={{ cursor: 'pointer' }}
|
style={{ cursor: 'pointer' }}
|
||||||
onClick={() => setEncryptedPassword('')}
|
onClick={clearEncryptedPasswordHandler}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
error={encryptedPasswordError}
|
error={encryptedPasswordError}
|
||||||
|
@ -84,7 +94,7 @@ const KeystoreFiles = () => {
|
||||||
size={16}
|
size={16}
|
||||||
color="#A1ABBD"
|
color="#A1ABBD"
|
||||||
style={{ cursor: 'pointer' }}
|
style={{ cursor: 'pointer' }}
|
||||||
onClick={() => setConfirmEncryptedPassword('')}
|
onClick={clearConfirmEncryptedPasswordHandler}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
error={confirmEncryptedPasswordError}
|
error={confirmEncryptedPasswordError}
|
||||||
|
|
Loading…
Reference in New Issue