Skip to content

Commit

Permalink
Merge branch 'develop' of github_p2p:p2p-org/key-app-android into fea…
Browse files Browse the repository at this point in the history
…ture/PWN-8969-striga-sms-errors-handling
  • Loading branch information
eduardmaximovich committed Jun 26, 2023
2 parents cbb533e + 579a286 commit e4144ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class DevicesPresenter(
if (restoreWalletInteractor.getUserEnterPhoneNumberTriesCount() >= MAX_PHONE_NUMBER_TRIES) {
restoreWalletInteractor.resetUserEnterPhoneNumberTriesCount()
view?.navigateToAccountBlocked(DEFAULT_BLOCK_TIME_IN_MINUTES.minutes.inWholeSeconds)
restoreWalletInteractor.resetUserPhoneNumber()
} else {
restoreWalletInteractor.startRestoreCustomShare(userPhoneNumber = phoneNumber)
view?.navigateToSmsInput()
Expand All @@ -119,13 +120,13 @@ class DevicesPresenter(
}

private fun handleGatewayServiceError(gatewayServiceError: PushServiceError) {
// TODO PWN-8827 fix error handling!
when (val gatewayHandledResult = gatewayServiceErrorHandler.handle(gatewayServiceError)) {
is GatewayHandledState.CriticalError -> {
view?.showUiKitSnackBar(gatewayHandledResult.errorCode.toString())
}
is GatewayHandledState.TimerBlockError -> {
view?.navigateToAccountBlocked(gatewayHandledResult.cooldownTtl)
restoreWalletInteractor.resetUserPhoneNumber()
}
is GatewayHandledState.TitleSubtitleError -> {
view?.showUiKitSnackBar(gatewayHandledResult.title)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class UpdateDeviceSmsInputPresenter(
}
is GatewayHandledState.TimerBlockError -> {
view?.navigateToSmsInputBlocked(gatewayHandledResult.error, gatewayHandledResult.cooldownTtl)
restoreWalletInteractor.resetUserPhoneNumber()
}
is GatewayHandledState.TitleSubtitleError -> {
view?.navigateToGatewayErrorScreen(gatewayHandledResult)
Expand Down

0 comments on commit e4144ce

Please sign in to comment.