diff --git a/src/pages/ValidatorOnboarding/KeyGeneration/KeystoreFiles.tsx b/src/pages/ValidatorOnboarding/KeyGeneration/KeystoreFiles.tsx index 1fb44a9d..0b81ed5e 100644 --- a/src/pages/ValidatorOnboarding/KeyGeneration/KeystoreFiles.tsx +++ b/src/pages/ValidatorOnboarding/KeyGeneration/KeystoreFiles.tsx @@ -50,6 +50,16 @@ const KeystoreFiles = () => { return '*'.repeat(passwordLength) } + const clearEncryptedPasswordHandler = () => { + setEncryptedPassword('') + setDisplayEncryptedPassword('') + } + + const clearConfirmEncryptedPasswordHandler = () => { + setConfirmEncryptedPassword('') + setDisplayConfirmEncryptedPassword('') + } + return ( @@ -65,7 +75,7 @@ const KeystoreFiles = () => { size={16} color="#A1ABBD" style={{ cursor: 'pointer' }} - onClick={() => setEncryptedPassword('')} + onClick={clearEncryptedPasswordHandler} /> } error={encryptedPasswordError} @@ -84,7 +94,7 @@ const KeystoreFiles = () => { size={16} color="#A1ABBD" style={{ cursor: 'pointer' }} - onClick={() => setConfirmEncryptedPassword('')} + onClick={clearConfirmEncryptedPasswordHandler} /> } error={confirmEncryptedPasswordError}