diff --git a/modules/react-native-status/android/build.gradle b/modules/react-native-status/android/build.gradle index b3f0dba7fb..d90c7656ca 100644 --- a/modules/react-native-status/android/build.gradle +++ b/modules/react-native-status/android/build.gradle @@ -16,5 +16,5 @@ dependencies { compile 'com.facebook.react:react-native:+' compile 'com.instabug.library:instabug:3+' compile 'status-im:function:0.0.1' - compile(group: 'status-im', name: 'status-go', version: 'develop-ge61c39b', ext: 'aar') + compile(group: 'status-im', name: 'status-go', version: 'bugfix-no-messaging-rinkeby-gd04e667-12', ext: 'aar') } diff --git a/modules/react-native-status/ios/RCTStatus/pom.xml b/modules/react-native-status/ios/RCTStatus/pom.xml index a3c2e286f9..8b95b25fbc 100644 --- a/modules/react-native-status/ios/RCTStatus/pom.xml +++ b/modules/react-native-status/ios/RCTStatus/pom.xml @@ -25,7 +25,7 @@ status-im status-go-ios-simulator - develop-ge61c39b + bugfix-no-messaging-rinkeby-gd04e667-12 zip true ./ diff --git a/src/status_im/ui/screens/accounts/events.cljs b/src/status_im/ui/screens/accounts/events.cljs index 9d9cdfded6..f00b350ca8 100644 --- a/src/status_im/ui/screens/accounts/events.cljs +++ b/src/status_im/ui/screens/accounts/events.cljs @@ -16,7 +16,8 @@ [status-im.utils.handlers :as handlers] [status-im.ui.screens.accounts.statuses :as statuses] [status-im.utils.signing-phrase.core :as signing-phrase] - [status-im.utils.gfycat.core :refer [generate-gfy]])) + [status-im.utils.gfycat.core :refer [generate-gfy]] + [status-im.utils.hex :as utils.hex])) ;;;; Helper fns @@ -108,13 +109,16 @@ (fn [{{:keys [network] :networks/keys [networks] :as db} :db} [_ {:keys [address] :as account} password]] - (let [account' (assoc account :network network - :networks networks)] + (let [address (utils.hex/normalize-hex address) + account' (assoc account + :network network + :networks networks + :address address)] (merge - {:db (assoc-in db [:accounts/accounts address] account') - ::save-account account'} - (when password - {:dispatch-later [{:ms 400 :dispatch [:login-account address password true]}]}))))) + {:db (assoc-in db [:accounts/accounts address] account') + ::save-account account'} + (when password + {:dispatch-later [{:ms 400 :dispatch [:login-account address password true]}]}))))) (handlers/register-handler-fx :create-new-account-handler diff --git a/src/status_im/utils/hex.cljs b/src/status_im/utils/hex.cljs index e2eb5252c1..eb37d89d08 100644 --- a/src/status_im/utils/hex.cljs +++ b/src/status_im/utils/hex.cljs @@ -1,12 +1,13 @@ (ns status-im.utils.hex - (:require [clojure.string :as s])) + (:require [clojure.string :as string])) (defn normalize-hex [hex] - (if (and hex (s/starts-with? hex "0x")) - (subs hex 2) - hex)) + (when hex + (string/lower-case (if (string/starts-with? hex "0x") + (subs hex 2) + hex)))) (defn valid-hex? [hex] (let [hex (normalize-hex hex)] (and (re-matches #"^[0-9a-fA-F]+$" hex) - (not= (js/parseInt hex 16) 0)))) \ No newline at end of file + (not= (js/parseInt hex 16) 0))))