Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watch-only address balance should not be included in the overall balance by default #19657 #19716

Merged
merged 14 commits into from
Apr 29, 2024
Merged
2 changes: 1 addition & 1 deletion src/status_im/subs/wallet/wallet.cljs
Expand Up @@ -290,7 +290,7 @@

(rf/reg-sub
:wallet/aggregated-tokens
:<- [:wallet/accounts]
:<- [:wallet/accounts-without-watched-accounts]
(fn [accounts]
(utils/aggregate-tokens-for-all-accounts accounts)))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(rf/reg-sub
 :wallet/aggregated-tokens
 :<- [:wallet/accounts-without-watched-accounts] ;; Replace :wallet/accounts with this sub
 (fn [accounts]
   (utils/aggregate-tokens-for-all-accounts accounts)))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Expand Down
6 changes: 3 additions & 3 deletions src/status_im/subs/wallet/wallet_test.cljs
Expand Up @@ -505,7 +505,7 @@
(assoc-in [:wallet :accounts] accounts)))
(let [{:keys [formatted-balance tokens]} (rf/sub [sub-name])]
(is (match? 2 (count tokens)))
(is (match? "$4506.00" formatted-balance)))))
(is (match? "$2106.00" formatted-balance)))))

(h/deftest-sub :wallet/accounts-with-customization-color
[sub-name]
Expand Down Expand Up @@ -656,8 +656,8 @@
(let [result (rf/sub [sub-name])
chains (keys result)]
(is (match? (count chains) 3))
(is (match? (get result constants/ethereum-mainnet-chain-id) "$3504.00"))
(is (match? (get result constants/optimism-mainnet-chain-id) "$1002.00")))))
(is (match? (get result constants/ethereum-mainnet-chain-id) "$1504.00"))
(is (match? (get result constants/optimism-mainnet-chain-id) "$602.00")))))

(h/deftest-sub :wallet/current-viewing-account-fiat-balance-per-chain
[sub-name]
Expand Down