From 23511941c59d49e43aaec02ae7433fe04caa4241 Mon Sep 17 00:00:00 2001 From: Ryan ZHAO <> Date: Thu, 4 Jul 2024 10:43:45 +1000 Subject: [PATCH] fix the ons error logic --- Session/Home/New Conversation/NewMessageScreen.swift | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Session/Home/New Conversation/NewMessageScreen.swift b/Session/Home/New Conversation/NewMessageScreen.swift index ce2b74f99..99bd19123 100644 --- a/Session/Home/New Conversation/NewMessageScreen.swift +++ b/Session/Home/New Conversation/NewMessageScreen.swift @@ -96,20 +96,11 @@ struct NewMessageScreen: View { modalActivityIndicator.dismiss { let message: String = { switch error { - case SnodeAPIError.onsDecryptionFailed, SnodeAPIError.onsHashingFailed, - SnodeAPIError.onsValidationFailed: - return "onsErrorUnableToSearch".localized() case SnodeAPIError.onsNotFound: return "new_message_screen_error_msg_unrecognized_ons".localized() - case is NetworkError: + default: return "onsErrorUnableToSearch".localized() - default: break } - - return (maybeSessionId?.prefix == .blinded15 || maybeSessionId?.prefix == .blinded25 ? - "accountIdErrorInvalid".localized() : - "new_message_screen_error_msg_unrecognized_ons".localized() - ) }() errorString = message