ConorOkus / uMlando-wallet

Lightning Dev Kit Android Demo Wallet
17 stars 9 forks source link

Add onchain wallet object #22

Closed thunderbiscuit closed 1 year ago

thunderbiscuit commented 1 year ago

This PR adds the OnchainWallet object which groups together most of the tasks related to onchain stuff.

Calls throughout the app now become OnchainWallet.sync(), OnchainWallet.getNewAddress(), or OnchainWallet.buildFundingTx().

Also worthy of review is the fact that I wasn't sure if the Global object really needed to be extending the Android Application class. I refactored it to be just a singleton, and it appears to be working fine on my end. Let me know if you'd prefer to keep it as it was.