Skip to content

Commit 2b2ef0f

Browse files
committed
Hide spending password error is deleted
1 parent 49fc6ef commit 2b2ef0f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

examples/wallet/app/pages/UnlockWallet.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,13 @@ export default ({ setKeysWithUnlockWalletPassword }: Props) => {
1818
return setKeysWithUnlockWalletPassword(unlockWalletPassword);
1919
} catch (error) {
2020
setIsWrongUnlockWalletPassword(true);
21-
setHiddenUnlockWalletPassword(false);
2221
}
2322
};
2423

2524
const [unlockWalletPassword, setUnlockWalletPassword] = useState('');
2625
const [isWrongSpendingPassword, setIsWrongUnlockWalletPassword] = useState(
2726
false
2827
);
29-
const [hiddenSpendingPassword, setHiddenUnlockWalletPassword] = useState(
30-
true
31-
);
3228

3329
return (
3430
<Container className={styles.container}>
@@ -46,7 +42,7 @@ export default ({ setKeysWithUnlockWalletPassword }: Props) => {
4642
isInvalid={isWrongSpendingPassword}
4743
onChange={event => setUnlockWalletPassword(event.target.value)}
4844
/>
49-
<Form.Label className="text-danger" hidden={hiddenSpendingPassword}>
45+
<Form.Label className="text-danger" hidden={!isWrongSpendingPassword}>
5046
<code>Incorrect password</code>
5147
</Form.Label>
5248
</Form.Group>

0 commit comments

Comments
 (0)