Skip to content

Commit

Permalink
Remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
abdrasulov committed May 6, 2024
1 parent 6ae6bda commit d5af330
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ import androidx.lifecycle.viewmodel.compose.viewModel
import androidx.navigation.NavController
import io.horizontalsystems.bankwallet.R
import io.horizontalsystems.bankwallet.core.AppLogger
import io.horizontalsystems.bankwallet.core.setNavigationResultX
import io.horizontalsystems.bankwallet.core.slideFromBottom
import io.horizontalsystems.bankwallet.core.stats.StatPage
import io.horizontalsystems.bankwallet.modules.confirm.ConfirmTransactionScreen
import io.horizontalsystems.bankwallet.modules.send.evm.confirmation.SendEvmConfirmationFragment
import io.horizontalsystems.bankwallet.modules.sendevmtransaction.SendEvmTransactionView
import io.horizontalsystems.bankwallet.ui.compose.components.ButtonPrimaryDefault
import io.horizontalsystems.bankwallet.ui.compose.components.ButtonPrimaryYellow
Expand Down Expand Up @@ -72,22 +70,19 @@ fun WCSendEthRequestScreen(
buttonEnabled = false
HudHelper.showInProcessMessage(view, R.string.Send_Sending, SnackbarDuration.INDEFINITE)

val result = try {
try {
logger.info("click confirm button")
viewModel.confirm()
logger.info("success")

HudHelper.showSuccessMessage(view, R.string.Hud_Text_Done)
delay(1200)
SendEvmConfirmationFragment.Result(true)
} catch (t: Throwable) {
logger.warning("failed", t)
HudHelper.showErrorMessage(view, t.javaClass.simpleName)
SendEvmConfirmationFragment.Result(false)
}

buttonEnabled = true
navController.setNavigationResultX(result)
navController.popBackStack()
}
}
Expand Down

0 comments on commit d5af330

Please sign in to comment.