Skip to content

Commit

Permalink
Fix app crash during restore on SendConfirm screen
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelekol committed Nov 20, 2024
1 parent 835694f commit 2c88259
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,7 @@ class MainFragment : BaseComposeFragment() {
)
} ?: run {
// Back stack entry doesn't exist, restart activity
val intent = requireActivity().intent
intent.data = null
requireActivity().finishAffinity()
startActivity(intent)
requireActivity().recreate()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ class SendEvmConfirmationFragment : BaseComposeFragment() {

@Composable
override fun GetContent(navController: NavController) {
SendEvmConfirmationScreen(navController, navController.requireInput())
val input = try {
navController.requireInput<Input>()
} catch (e: NullPointerException) {
navController.popBackStack()
return
}
SendEvmConfirmationScreen(navController, input)
}

@Parcelize
Expand Down

0 comments on commit 2c88259

Please sign in to comment.