nblockchain / geewallet

geewallet is a non-custodial, minimalistic & pragmatist opensource crossplatform lightweight brainwallet to hold the most important cryptoassets in the same application with ease & peace of mind
MIT License
61 stars 37 forks source link

Backend/UtxoCoin: support native-segwit with cold storage #254

Closed knocte closed 8 months ago

knocte commented 8 months ago

This change also reduces a bit of primitive obsession (i.e. string vs BitcoinAddress) to make the code less "stringly-typed" lol.

This should have been done in [1] but was an oversight on my part when reviewing.

[1] https://github.com/nblockchain/geewallet/pull/211

knocte commented 8 months ago

@aarani this is ready for review now, can you have a very quick look?

knocte commented 8 months ago

"Many ToString() instances" is much better (or rather, less worse) than "Many : string return types". Do you understand?

knocte commented 8 months ago

Actually there's 3 things missing in this PR:

  1. A first commit (to be placed before the 2 existing ones) that converts nestedSegwit readOnly accounts to nativeSegwit readOnly accounts (so that users don't need to re-setup manually).
  2. Rename OriginMainAddress to OriginDefaultAddress, cause I don't want the word "Main" to be conflated with "Mainnet".
  3. Add exception details (e.g. stacktraces) of the problems I got, in the commit titled "Backend/UtxoCoin: support nativeSegwit+coldStorage" and in the commit to be done mentioned in (1) above.

I'll work on the above today.