[fix #8813] status-go version is shown as N/A

fix #8813

Signed-off-by: yenda <eric@status.im>
This commit is contained in:
yenda 2019-09-03 09:56:58 +02:00
parent df66b73054
commit 6427061bad
No known key found for this signature in database
GPG Key ID: 0095623C0069DCE6
3 changed files with 4 additions and 6 deletions

View File

@ -94,10 +94,8 @@
(fx/defn initialize-web3-client-version (fx/defn initialize-web3-client-version
{:events [::initialize-web3-client-version]} {:events [::initialize-web3-client-version]}
[{:keys [db]} resp] [{:keys [db]} node-version]
(if-let [node-version (second (re-find #"StatusIM/v(.*)/.*/.*" resp))] {:db (assoc db :web3-node-version node-version)})
{:db (assoc db :web3-node-version node-version)}
(log/warn (str "unexpected web3 version format: " "'" resp "'"))))
(fx/defn save-user-password (fx/defn save-user-password
[cofx address password] [cofx address password]

View File

@ -285,7 +285,7 @@
(get search :filter))) (get search :filter)))
(defn- node-version [web3-node-version] (defn- node-version [web3-node-version]
(str "status-go v" (or web3-node-version "N/A") "")) (or web3-node-version "N/A"))
(def app-short-version (def app-short-version
(let [version (if platform/desktop? build/version build/build-no)] (let [version (if platform/desktop? build/version build/build-no)]

View File

@ -24,7 +24,7 @@
{:type :small {:type :small
:title (i18n/label :t/version) :title (i18n/label :t/version)
:accessibility-label :version :accessibility-label :version
:accessories [(str app-version "; " node-version)]}]]]) :accessories [(str app-version ";\n" node-version)]}]]])
(views/defview about-app [] (views/defview about-app []
(views/letsubs [app-version [:get-app-short-version] (views/letsubs [app-version [:get-app-short-version]