mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-24 01:08:27 +00:00
quickfix: Pin modal - flowtype fixes + update "Learn more" link
This commit is contained in:
parent
571462f08f
commit
379522a1a7
@ -40,10 +40,6 @@ const Footer = styled.div`
|
||||
`;
|
||||
|
||||
class Pin extends Component<Props, State> {
|
||||
keyboardHandler: (event: KeyboardEvent) => void;
|
||||
|
||||
state: State;
|
||||
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
|
||||
@ -52,6 +48,15 @@ class Pin extends Component<Props, State> {
|
||||
};
|
||||
}
|
||||
|
||||
componentWillMount(): void {
|
||||
this.keyboardHandler = this.keyboardHandler.bind(this);
|
||||
window.addEventListener('keydown', this.keyboardHandler, false);
|
||||
}
|
||||
|
||||
componentWillUnmount(): void {
|
||||
window.removeEventListener('keydown', this.keyboardHandler, false);
|
||||
}
|
||||
|
||||
onPinAdd = (input: number): void => {
|
||||
let { pin } = this.state;
|
||||
if (pin.length < 9) {
|
||||
@ -120,18 +125,11 @@ class Pin extends Component<Props, State> {
|
||||
case 105:
|
||||
this.onPinAdd(9);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
componentWillMount(): void {
|
||||
this.keyboardHandler = this.keyboardHandler.bind(this);
|
||||
window.addEventListener('keydown', this.keyboardHandler, false);
|
||||
}
|
||||
|
||||
componentWillUnmount(): void {
|
||||
window.removeEventListener('keydown', this.keyboardHandler, false);
|
||||
}
|
||||
keyboardHandler: (event: KeyboardEvent) => void;
|
||||
|
||||
render() {
|
||||
if (!this.props.modal.opened) return null;
|
||||
@ -165,7 +163,7 @@ class Pin extends Component<Props, State> {
|
||||
<StyledP isSmaller>Not sure how PIN works?
|
||||
<StyledLink
|
||||
isGreen
|
||||
href="http://doc.satoshilabs.com/trezor-user/enteringyourpin.html"
|
||||
href="https://wiki.trezor.io/User_manual:Entering_PIN"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
>Learn more
|
||||
|
Loading…
Reference in New Issue
Block a user