1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-24 09:18:09 +00:00

Fix issue when empty passphrase couldn't be submitted after checking & unchecking "Show passphrase"

This commit is contained in:
Vasek Mlejnsky 2018-09-21 09:40:50 +02:00 committed by Szymon Lesisz
parent bfe6dae0a1
commit a848e35b69

View File

@ -241,11 +241,12 @@ export default class PinModal extends Component<Props, State> {
visible: false,
});
if (this.passphraseRevisionInput) {
this.passphraseRevisionInput.value = '';
this.setState({
passphraseRevision: '',
match: false,
});
const emptyPassphraseRevisionValue = '';
this.passphraseRevisionInput.value = emptyPassphraseRevisionValue;
this.setState(previousState => ({
passphraseRevision: emptyPassphraseRevisionValue,
match: emptyPassphraseRevisionValue === previousState.passphrase,
}));
this.passphraseRevisionInput.disabled = false;
}
}