Skip to content

Commit 70ebca3

Browse files
committed
chore: fix lint
1 parent 89fd91e commit 70ebca3

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

app/src/main/java/to/bitkit/ui/screens/wallets/receive/ReceiveSheet.kt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import kotlinx.coroutines.coroutineScope
1616
import kotlinx.coroutines.launch
1717
import kotlinx.serialization.Serializable
1818
import to.bitkit.repositories.LightningState
19-
import to.bitkit.ui.appViewModel
2019
import to.bitkit.ui.blocktankViewModel
2120
import to.bitkit.ui.screens.wallets.send.AddTagScreen
2221
import to.bitkit.ui.shared.modifiers.sheetHeight
@@ -30,9 +29,8 @@ fun ReceiveSheet(
3029
navigateToExternalConnection: () -> Unit,
3130
walletState: MainUiState,
3231
) {
33-
val app = appViewModel ?: return
34-
val wallet = walletViewModel ?: return
35-
val blocktank = blocktankViewModel ?: return
32+
val wallet = requireNotNull(walletViewModel)
33+
val blocktank = requireNotNull(blocktankViewModel)
3634

3735
val navController = rememberNavController()
3836

@@ -42,13 +40,12 @@ fun ReceiveSheet(
4240
val lightningState: LightningState by wallet.lightningState.collectAsStateWithLifecycle()
4341

4442
LaunchedEffect(Unit) {
45-
try {
43+
runCatching {
44+
// TODO move to viewModel
4645
coroutineScope {
4746
launch { wallet.refreshBip21() }
4847
launch { blocktank.refreshInfo() }
4948
}
50-
} catch (e: Exception) {
51-
app.toast(e)
5249
}
5350
}
5451

0 commit comments

Comments
 (0)