Fix qr code and bootnode

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
Andrea Maria Piana 2019-03-21 08:44:39 +01:00 committed by Igor Mandrigin
parent d698ffe09e
commit 25ea0192e5
No known key found for this signature in database
GPG Key ID: 4A0EDDE26E66BC8B
2 changed files with 9 additions and 1 deletions

View File

@ -3,6 +3,7 @@
[re-frame.core :as re-frame]
[status-im.accounts.update.core :as accounts.update]
[status-im.i18n :as i18n]
[status-im.ui.screens.navigation :as navigation]
[status-im.utils.fx :as fx]))
@ -92,7 +93,7 @@
(fx/defn set-bootnodes-from-qr
[cofx url]
(assoc (set-input :url url cofx)
(assoc (set-input cofx :url (string/trim url))
:dispatch [:navigate-back]))
(fx/defn show-delete-bootnode-confirmation

View File

@ -61,6 +61,13 @@
:error true}}}}
(model/set-input {:db {}} :url "broken"))))))
(deftest set-bootnode-from-qr
(testing "correct name"
(is (= {:dispatch [:navigate-back]
:db {:bootnodes/manage {:url {:value valid-bootnode-address
:error false}}}}
(model/set-bootnodes-from-qr {:db {}} (str valid-bootnode-address " "))))))
(deftest edit-bootnode
(let [db {:network "mainnet_rpc"
:account/account