BitBoxSwiss / bitbox-wallet-app

The BitBoxApp for desktop and mobile.
https://bitbox.swiss/app
Apache License 2.0
251 stars 82 forks source link

frontend: refactor password.jsx into typescript #2742

Closed NicolaLS closed 4 days ago

NicolaLS commented 2 months ago

Refactor the password.jsx file into typescript.

I had to cast to the concrete type a lot of times, I'm not sure if that makes sense since it can throw an error, but how should an error be handled? e.g. this.setState({ [stateKey]: value } as Pick<TState, keyof TState>, this.validate);

NicolaLS commented 2 months ago

@thisconnect thanks, PTAL.

note: I removed the UNSAFE_componentWillMount and added the keydown event listener in the componentDidMount now because (at least on webdev firefox) the listener did not work (the method ran, but the listener was either not added correctly or broken).

NicolaLS commented 5 days ago

@thisconnect thanks, first push was the actual change, last push is a rebase on master.