diff --git a/src/status_im/network/core.cljs b/src/status_im/network/core.cljs index eb82333441..e273574570 100644 --- a/src/status_im/network/core.cljs +++ b/src/status_im/network/core.cljs @@ -114,7 +114,7 @@ (accounts.update/account-update {:network network-id :last-updated now} - {})) + {:success-event [:accounts.update.callback/save-settings-success]})) (fx/merge cofx {:ui/show-confirmation {:title (i18n/label :t/close-app-title) :content (i18n/label :t/close-app-content) @@ -136,13 +136,16 @@ :id 1}) :opts {:headers {"Content-Type" "application/json"}} :success-event-creator (fn [{:keys [response-body]}] - (let [client-version (:result (http/parse-payload response-body))] + (if-let [client-version (:result (http/parse-payload response-body))] [::connect-success {:network-id network-id :on-success on-success - :client-version client-version}])) + :client-version client-version}] + [::connect-failure {:network-id network-id + :on-failure on-failure + :reason (i18n/label :t/network-invalid-url)}])) :failure-event-creator (fn [{:keys [response-body status-code]}] (let [reason (if status-code - (str "Got a wrong status code: " status-code) + (i18n/label :t/network-invalid-status-code {:code status-code}) (str response-body))] [::connect-failure {:network-id network-id :on-failure on-failure diff --git a/src/status_im/ui/screens/views.cljs b/src/status_im/ui/screens/views.cljs index 2ddfad1aa2..6ef33260d1 100644 --- a/src/status_im/ui/screens/views.cljs +++ b/src/status_im/ui/screens/views.cljs @@ -164,7 +164,8 @@ :new-public-chat new-public-chat :open-dapp open-dapp :dapp-description dapp-description - :browser browser} + :browser browser + :login login} :config {:headerMode "none" :initialRouteName "home"}} @@ -237,7 +238,8 @@ :config {:headerMode "none"}} :unsigned-transactions wallet-transactions/transactions :transactions-history wallet-transactions/transactions - :wallet-transaction-details wallet-transactions/transaction-details}) + :wallet-transaction-details wallet-transactions/transaction-details + :login login}) {:headerMode "none" :initialRouteName "wallet"})} :wallet-settings-assets diff --git a/translations/en.json b/translations/en.json index 28d1ba865f..b78e50e04d 100644 --- a/translations/en.json +++ b/translations/en.json @@ -751,5 +751,7 @@ "share-link": "Share link", "share-profile-link": "Share profile link", "share-public-chat-text": "Check out this public chat on the Status app: {{link}}", - "share-dapp-text": "Check out this DApp I'm using on Status: {{link}}" + "share-dapp-text": "Check out this DApp I'm using on Status: {{link}}", + "network-invalid-url": "Network URL is invalid", + "network-invalid-status-code": "Invalid status code: {{code}}" }