diff --git a/src/status_im/transport/utils.cljs b/src/status_im/transport/utils.cljs index a52f85a159..a64ff7b4b3 100644 --- a/src/status_im/transport/utils.cljs +++ b/src/status_im/transport/utils.cljs @@ -19,4 +19,5 @@ (get 0))) (defn extract-url-components [address] - (rest (re-matches #"enode://(.*?)@(.*):(.*)" address))) + (when address + (rest (re-matches #"enode://(.*?)@(.*):(.*)" address)))) diff --git a/src/status_im/utils/logging/core.cljs b/src/status_im/utils/logging/core.cljs index 5b0386e606..b238938963 100644 --- a/src/status_im/utils/logging/core.cljs +++ b/src/status_im/utils/logging/core.cljs @@ -81,6 +81,12 @@ :on-cancel #(re-frame/dispatch [:logging/dialog-canceled])}})) +(handlers/register-handler-fx + :show-client-error + (fn [_ _] + {:utils/show-popup {:title (i18n/label :t/cant-report-bug) + :content (i18n/label :t/mail-should-be-configured)}})) + (fx/defn dialog-closed [{:keys [db]}] {:db (dissoc db :logging/dialog-shown?)}) @@ -102,7 +108,8 @@ (str "App version: " build-version) (str "OS: " platform/os) (str "Node version: " web3-node-version) - (str "Mailserver: " (name current-id)) + (when current-id + (str "Mailserver: " (name current-id))) separator "Node Info" (str "id: " enode-id) @@ -136,7 +143,9 @@ :attachment {:path archive-path :type "zip" :name "status_logs.zip"}} - (fn []))))) + (fn [event] + (when (= event "not_available") + (re-frame/dispatch [:show-client-error]))))))) (handlers/register-handler-fx :logging/dialog-canceled diff --git a/translations/en.json b/translations/en.json index cfafa05fdf..1963648481 100644 --- a/translations/en.json +++ b/translations/en.json @@ -1158,5 +1158,7 @@ "keycard-free-pairing-slots": "Keycard has {{n}} free pairing slots", "public-chat-description": "Join public chats for your interests! Anyone can start a new one.", "delete-account": "Delete account", - "watch-only": "Watch-only" + "watch-only": "Watch-only", + "cant-report-bug": "Can't report a bug", + "mail-should-be-configured": "Mail client should be configured" }