mirror of
https://github.com/status-im/status-react.git
synced 2025-02-19 22:28:40 +00:00
[#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]
|
(fn [accounts]
|
||||||
(filter #(not= (:type %) :watch) 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 ==============================================================================================================
|
;;CHAT ==============================================================================================================
|
||||||
|
|
||||||
(re-frame/reg-sub
|
(re-frame/reg-sub
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
:background-color colors/gray-lighter})
|
:background-color colors/gray-lighter})
|
||||||
|
|
||||||
(defview add-watch-account []
|
(defview add-watch-account []
|
||||||
(letsubs [{:keys [address]} [:add-account]]
|
(letsubs [add-account-disabled? [:add-account-disabled?]]
|
||||||
[react/keyboard-avoiding-view {:flex 1}
|
[react/keyboard-avoiding-view {:flex 1}
|
||||||
[topbar/topbar]
|
[topbar/topbar]
|
||||||
[react/view {:flex 1
|
[react/view {:flex 1
|
||||||
@ -84,7 +84,7 @@
|
|||||||
:right {:type :next
|
:right {:type :next
|
||||||
:label "Next"
|
:label "Next"
|
||||||
:on-press #(re-frame/dispatch [:wallet.accounts/add-watch-account])
|
:on-press #(re-frame/dispatch [:wallet.accounts/add-watch-account])
|
||||||
:disabled? (not (ethereum/address? address))}}]]))
|
:disabled? add-account-disabled?}}]]))
|
||||||
|
|
||||||
(defview pin []
|
(defview pin []
|
||||||
(letsubs [pin [:hardwallet/pin]
|
(letsubs [pin [:hardwallet/pin]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user