Skip to content

Commit

Permalink
PWN-9040 - phone number reset on block screen (#1877)
Browse files Browse the repository at this point in the history
  • Loading branch information
kabramovp2p authored Jun 26, 2023
1 parent 4c7aa68 commit 579a286
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 579a286

Please sign in to comment.