diff --git a/app/src/main/java/org/p2p/wallet/auth/repository/RestoreFlowDataLocalRepository.kt b/app/src/main/java/org/p2p/wallet/auth/repository/RestoreFlowDataLocalRepository.kt
index 349b261dc8..c3362618aa 100644
--- a/app/src/main/java/org/p2p/wallet/auth/repository/RestoreFlowDataLocalRepository.kt
+++ b/app/src/main/java/org/p2p/wallet/auth/repository/RestoreFlowDataLocalRepository.kt
@@ -72,7 +72,8 @@ class RestoreFlowDataLocalRepository(signUpDetailsStorage: UserSignUpDetailsStor
var torusKey: String? = null
set(value) {
field = value
- torusKeyTimestamp = DateTimeUtils.getCurrentTimestampInSeconds()
+ torusKeyTimestamp = value?.let { DateTimeUtils.getCurrentTimestampInSeconds() } ?: 0
+
Timber.tag(TAG).i("torusKey is generated and set: ${torusKey?.length}")
}
diff --git a/app/src/main/java/org/p2p/wallet/auth/ui/restore_error/RestoreErrorScreenFragment.kt b/app/src/main/java/org/p2p/wallet/auth/ui/restore_error/RestoreErrorScreenFragment.kt
index 6c02b6af63..23ab67f9f2 100644
--- a/app/src/main/java/org/p2p/wallet/auth/ui/restore_error/RestoreErrorScreenFragment.kt
+++ b/app/src/main/java/org/p2p/wallet/auth/ui/restore_error/RestoreErrorScreenFragment.kt
@@ -26,6 +26,7 @@ import org.p2p.wallet.databinding.FragmentRestoreErrorScreenBinding
import org.p2p.wallet.intercom.IntercomService
import org.p2p.wallet.root.SystemIconsStyle
import org.p2p.wallet.utils.args
+import org.p2p.wallet.utils.emptyString
import org.p2p.wallet.utils.popAndReplaceFragment
import org.p2p.wallet.utils.viewbinding.viewBinding
import org.p2p.wallet.utils.withArgs
@@ -65,6 +66,7 @@ class RestoreErrorScreenFragment :
binding.toolbar.inflateMenu(R.menu.menu_onboarding_help)
binding.toolbar.setOnMenuItemClickListener {
if (it.itemId == R.id.helpItem) {
+ IntercomService.signIn(userId = emptyString())
IntercomService.showMessenger()
}
return@setOnMenuItemClickListener true
diff --git a/app/src/main/java/org/p2p/wallet/settings/ui/devices/DevicesPresenter.kt b/app/src/main/java/org/p2p/wallet/settings/ui/devices/DevicesPresenter.kt
index e882d7d7bc..871cc10266 100644
--- a/app/src/main/java/org/p2p/wallet/settings/ui/devices/DevicesPresenter.kt
+++ b/app/src/main/java/org/p2p/wallet/settings/ui/devices/DevicesPresenter.kt
@@ -57,7 +57,6 @@ class DevicesPresenter(
deviceNameTimestampSec = DateTimeUtils.getCurrentTimestampInSeconds()
)
refreshDeviceShare(newMetadata)
- view?.showSuccessDeviceChange()
}
private suspend fun refreshDeviceShare(newMetadata: GatewayOnboardingMetadata) {
diff --git a/app/src/main/java/org/p2p/wallet/smsinput/updatedevice/UpdateDeviceSmsInputFragment.kt b/app/src/main/java/org/p2p/wallet/smsinput/updatedevice/UpdateDeviceSmsInputFragment.kt
index 96dc5b8ce3..043eb9a332 100644
--- a/app/src/main/java/org/p2p/wallet/smsinput/updatedevice/UpdateDeviceSmsInputFragment.kt
+++ b/app/src/main/java/org/p2p/wallet/smsinput/updatedevice/UpdateDeviceSmsInputFragment.kt
@@ -47,7 +47,9 @@ class UpdateDeviceSmsInputFragment : BaseSmsInputFragment() {
)
}
- override fun navigateToGatewayErrorScreen(handledState: GatewayHandledState) = Unit
+ override fun navigateToGatewayErrorScreen(handledState: GatewayHandledState) {
+ showUiKitSnackBar(messageResId = R.string.error_general_message)
+ }
override fun navigateToRestoreErrorScreen(handledState: RestoreFailureState.TitleSubtitleError) = Unit
diff --git a/app/src/main/java/org/p2p/wallet/smsinput/updatedevice/UpdateDeviceSmsInputPresenter.kt b/app/src/main/java/org/p2p/wallet/smsinput/updatedevice/UpdateDeviceSmsInputPresenter.kt
index 76a017ab4e..f287fba8f0 100644
--- a/app/src/main/java/org/p2p/wallet/smsinput/updatedevice/UpdateDeviceSmsInputPresenter.kt
+++ b/app/src/main/java/org/p2p/wallet/smsinput/updatedevice/UpdateDeviceSmsInputPresenter.kt
@@ -67,11 +67,9 @@ class UpdateDeviceSmsInputPresenter(
}
private fun handleGatewayError(error: PushServiceError) {
- // TODO PWN-8827 fix error handling!
when (val gatewayHandledResult = gatewayServiceErrorHandler.handle(error)) {
is GatewayHandledState.CriticalError -> {
view?.navigateToGatewayErrorScreen(gatewayHandledResult)
- view?.showUiKitSnackBar(gatewayHandledResult.errorCode.toString())
}
GatewayHandledState.IncorrectOtpCodeError -> {
view?.renderIncorrectSms()
@@ -81,10 +79,9 @@ class UpdateDeviceSmsInputPresenter(
}
is GatewayHandledState.TitleSubtitleError -> {
view?.navigateToGatewayErrorScreen(gatewayHandledResult)
- view?.showUiKitSnackBar(gatewayHandledResult.title)
}
is GatewayHandledState.ToastError -> {
- view?.showUiKitSnackBar(gatewayHandledResult.message)
+ view?.navigateToGatewayErrorScreen(gatewayHandledResult)
}
else -> {
Timber.i("GatewayService error is not handled")
diff --git a/app/src/main/res/values/settings_strings.xml b/app/src/main/res/values/settings_strings.xml
index d703775451..bcd1d4ebee 100644
--- a/app/src/main/res/values/settings_strings.xml
+++ b/app/src/main/res/values/settings_strings.xml
@@ -108,7 +108,7 @@
Incorrect Google account
- This account is associated with %s. Please log in with the correct Google account.
+ %s\nPlease log in with the correct Google account.
Use another account