Convert useWallet and dependencies to ts. Patch bugs discovered in ts implementation.
Ended up being quite a large diff.
I don't think there is much point in splitting it up, since everything is interdependent, and the integration tests confirm expected behavior. If something goes wrong, we can revert it all.
Summary of changes
- New types for legacy wallets. Complicated implementation as these overlap in various ways.
- Update wallet migration and storage functions to work with the types.
- Patch some bugs discovered during ts implementation, for example `parseInt()` being used on something that was already a number in useWallet.js.
- Some cleanup on wallet loading and migration in useWallet.js brought on by issues discovered in ts implementation
- Major update of mocked wallets -- all tx history is now ChronikClient and type checked; all legacy wallets are appropriate legacy types.