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.
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()
, orOnchainWallet.buildFundingTx()
.Also worthy of review is the fact that I wasn't sure if the
Global
object really needed to be extending the AndroidApplication
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.