New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds screen to list usable channels #29
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,14 +29,7 @@ interface Access { | |
|
||
companion object { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you might be able to do without the For example if you remove the companion object entirely, the one call to the AccessImpl is in onClick = {
CoroutineScope(Dispatchers.IO).launch {
// Access.create().sync()
AccessImpl().sync()
}
} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or you could create the object above and simply reuse it every time you sync instead of creating a new one every time. @Composable
fun WalletScreen() {
val accessImpl = AccessImpl()
// ...
onClick = {
CoroutineScope(Dispatchers.IO).launch {
accessImpl.sync()
}
} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated in c446025 |
||
fun create(): Access { | ||
// Setup BDK Esplora client | ||
val esploraURL: String = "http://10.0.2.2:3002" | ||
val blockchainConfig = | ||
BlockchainConfig.Esplora(EsploraConfig(esploraURL, null, 5u, 20u, null)) | ||
|
||
return AccessImpl( | ||
blockchain = Blockchain(blockchainConfig), | ||
) | ||
return AccessImpl() | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep that's the better way to do it for sure.