Skip to content

Commit

Permalink
yep
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Son89 committed Dec 5, 2023
1 parent 1367305 commit f2b4e8b
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

(defn my-accounts
[]
(let [other-accounts (rf/sub [:wallet/other-accounts])]
(let [other-accounts (rf/sub [:wallet/accounts-without-current-viewing-account])]
(if (zero? (count other-accounts))
[quo/empty-state
{:title (i18n/label :t/no-other-accounts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@
(defn- f-view
[]
(let [margin-top (safe-area/get-top)

on-close (fn []
(rf/dispatch [:wallet/clean-scanned-address])
(rf/dispatch [:wallet/clean-local-suggestions])
Expand Down
7 changes: 0 additions & 7 deletions src/status_im2/subs/wallet/wallet.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@
vals
(sort-by :position)))

(rf/reg-sub
:wallet/other-accounts
:<- [:wallet/accounts]
:<- [:wallet/current-viewing-account-address]
(fn [[accounts current-address]]
(filter #(not= (:address %) current-address) accounts)))

(rf/reg-sub
:wallet/addresses
:<- [:wallet]
Expand Down
11 changes: 0 additions & 11 deletions src/status_im2/subs/wallet/wallet_test.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -180,17 +180,6 @@
(= (set ["0x1" "0x2"])
(rf/sub [sub-name])))))

(h/deftest-sub :wallet/other-accounts
[sub-name]
(testing "returns all accounts except the current active"
(swap! rf-db/app-db
#(-> %
(assoc-in [:wallet :accounts] accounts)
(assoc-in [:wallet :current-viewing-account-address] "0x1")))
(is
(= [(get-in accounts ["0x2"])]
(rf/sub [sub-name])))))

(h/deftest-sub :wallet/watch-address-activity-state
[sub-name]
(testing "watch address activity state with nil value"
Expand Down

0 comments on commit f2b4e8b

Please sign in to comment.