[#9724] Status is not usable after relogin if add watch-only account that matches address of one of the created accounts
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
acaea38551
commit
c66e848255
|
@ -526,6 +526,14 @@
|
|||
(fn [accounts]
|
||||
(filter #(not= (:type %) :watch) accounts)))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:add-account-disabled?
|
||||
:<- [:multiaccount/accounts]
|
||||
:<- [:add-account]
|
||||
(fn [[accounts {:keys [address]}]]
|
||||
(or (not (ethereum/address? address))
|
||||
(some #(when (= (:address %) address) %) accounts))))
|
||||
|
||||
;;CHAT ==============================================================================================================
|
||||
|
||||
(re-frame/reg-sub
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
:background-color colors/gray-lighter})
|
||||
|
||||
(defview add-watch-account []
|
||||
(letsubs [{:keys [address]} [:add-account]]
|
||||
(letsubs [add-account-disabled? [:add-account-disabled?]]
|
||||
[react/keyboard-avoiding-view {:flex 1}
|
||||
[topbar/topbar]
|
||||
[react/view {:flex 1
|
||||
|
@ -84,7 +84,7 @@
|
|||
:right {:type :next
|
||||
:label "Next"
|
||||
:on-press #(re-frame/dispatch [:wallet.accounts/add-watch-account])
|
||||
:disabled? (not (ethereum/address? address))}}]]))
|
||||
:disabled? add-account-disabled?}}]]))
|
||||
|
||||
(defview pin []
|
||||
(letsubs [pin [:hardwallet/pin]
|
||||
|
|
Loading…
Reference in New Issue