Skip to content

Commit

Permalink
fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mmilad75 committed Apr 29, 2024
1 parent 9f338c2 commit 71d54e3
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions src/status_im/contexts/wallet/home/view.cljs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
(ns status-im.contexts.wallet.home.view
(:require
[quo.core :as quo]
[quo.foundations.colors :as colors]
[react-native.core :as rn]
[reagent.core :as reagent]
[status-im.common.home.top-nav.view :as common.top-nav]
[status-im.contexts.wallet.home.style :as style]
[status-im.contexts.wallet.home.tabs.view :as tabs]
[status-im.contexts.wallet.sheets.network-filter.view :as network-filter]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
[quo.core :as quo]
[quo.foundations.colors :as colors]
[react-native.core :as rn]
[reagent.core :as reagent]
[status-im.common.home.top-nav.view :as common.top-nav]
[status-im.contexts.wallet.home.style :as style]
[status-im.contexts.wallet.home.tabs.view :as tabs]
[status-im.contexts.wallet.sheets.network-filter.view :as network-filter]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))

(defn new-account
[]
Expand Down Expand Up @@ -40,13 +40,13 @@
(defn view
[]
(let [[selected-tab set-selected-tab] (rn/use-state (:id (first tabs-data)))
account-list-ref (rn/use-ref-atom nil)
tokens-loading? (rf/sub [:wallet/tokens-loading?])
networks (rf/sub [:wallet/selected-network-details])
account-cards-data (rf/sub [:wallet/account-cards-data])
cards (conj account-cards-data (new-account-card-data))
[init-loaded? set-init-loaded] (rn/use-state false)
{:keys [formatted-balance]} (rf/sub [:wallet/aggregated-token-values-and-balance])]
account-list-ref (rn/use-ref-atom nil)
tokens-loading? (rf/sub [:wallet/tokens-loading?])
networks (rf/sub [:wallet/selected-network-details])
account-cards-data (rf/sub [:wallet/account-cards-data])
cards (conj account-cards-data (new-account-card-data))
[init-loaded? set-init-loaded] (rn/use-state false)
{:keys [formatted-balance]} (rf/sub [:wallet/aggregated-token-values-and-balance])]
(rn/use-effect (fn []
(when (and @account-list-ref (pos? (count cards)))
(.scrollToOffset ^js @account-list-ref
Expand All @@ -60,12 +60,14 @@
[tokens-loading?])
[rn/view {:style (style/home-container)}
[common.top-nav/view]
[rn/scroll-view {:refresh-control (reagent/as-element
[rn/refresh-control {:refreshing (and tokens-loading? init-loaded?)
:colors colors/neutral-40
:tint-color colors/neutral-40
:on-refresh #(rf/dispatch [:wallet/get-accounts])}])
:style {:flex 1}}
[rn/scroll-view
{:refresh-control (reagent/as-element
[rn/refresh-control
{:refreshing (and tokens-loading? init-loaded?)
:colors colors/neutral-40
:tint-color colors/neutral-40
:on-refresh #(rf/dispatch [:wallet/get-accounts])}])
:style {:flex 1}}
[rn/view {:style style/overview-container}
[quo/wallet-overview
{:state (if tokens-loading? :loading :default)
Expand Down

0 comments on commit 71d54e3

Please sign in to comment.