diff --git a/src/status_im2/contexts/wallet/events.cljs b/src/status_im2/contexts/wallet/events.cljs index 1d8658536723..cf0ef898c909 100644 --- a/src/status_im2/contexts/wallet/events.cljs +++ b/src/status_im2/contexts/wallet/events.cljs @@ -67,6 +67,10 @@ db (data-store/rpc->accounts wallet-accounts)) :fx [[:dispatch [:wallet/get-wallet-token]] + [:dispatch + [:wallet/request-collectibles + {:start-at-index 0 + :new-request? true}]] (when new-account? [:dispatch [:wallet/navigate-to-new-account navigate-to-account]])]}))) diff --git a/src/status_im2/contexts/wallet/home/view.cljs b/src/status_im2/contexts/wallet/home/view.cljs index 13fe3a3d150f..286a48d53916 100644 --- a/src/status_im2/contexts/wallet/home/view.cljs +++ b/src/status_im2/contexts/wallet/home/view.cljs @@ -38,52 +38,37 @@ {:id :collectibles :label (i18n/label :t/collectibles) :accessibility-label :collectibles-tab} {:id :activity :label (i18n/label :t/activity) :accessibility-label :activity-tab}]) -(def aval - (atom {:a 1 - :b 2})) - -(reset! aval {:a 4}) - -(defn f-view-internal - [selected-tab] - (let [networks (rf/sub [:wallet/network-details]) - account-cards-data (rf/sub [:wallet/account-cards-data]) - accounts (rf/sub [:wallet/accounts]) - cards (conj account-cards-data (new-account-card-data))] - (rn/use-effect (fn [] - (rf/dispatch [:wallet/request-collectibles - {:start-at-index 0 - :new-request? true}])) - [(count accounts)]) - [rn/view {:style style/home-container} - [common.top-nav/view] - [rn/view {:style style/overview-container} - [quo/wallet-overview (temp/wallet-overview-state networks)]] - [quo/wallet-graph {:time-frame :empty}] - [rn/flat-list - {:style style/accounts-list - :content-container-style style/accounts-list-container - :data cards - :horizontal true - :separator [rn/view {:style styles/separator}] - :render-fn quo/account-card - :shows-horizontal-scroll-indicator false}] - [quo/tabs - {:style style/tabs - :size 32 - :default-active @selected-tab - :data tabs-data - :on-change #(reset! selected-tab %)}] - (case @selected-tab - :assets [rn/flat-list - {:render-fn quo/token-value - :data temp/tokens - :key :assets-list - :content-container-style style/selected-tab-container}] - :collectibles [collectibles/view] - [activity/view])])) - (defn view [] (let [selected-tab (reagent/atom (:id (first tabs-data)))] - [:f> f-view-internal selected-tab])) + (fn [] + (let [networks (rf/sub [:wallet/network-details]) + account-cards-data (rf/sub [:wallet/account-cards-data]) + cards (conj account-cards-data (new-account-card-data))] + [rn/view {:style style/home-container} + [common.top-nav/view] + [rn/view {:style style/overview-container} + [quo/wallet-overview (temp/wallet-overview-state networks)]] + [quo/wallet-graph {:time-frame :empty}] + [rn/flat-list + {:style style/accounts-list + :content-container-style style/accounts-list-container + :data cards + :horizontal true + :separator [rn/view {:style styles/separator}] + :render-fn quo/account-card + :shows-horizontal-scroll-indicator false}] + [quo/tabs + {:style style/tabs + :size 32 + :default-active @selected-tab + :data tabs-data + :on-change #(reset! selected-tab %)}] + (case @selected-tab + :assets [rn/flat-list + {:render-fn quo/token-value + :data temp/tokens + :key :assets-list + :content-container-style style/selected-tab-container}] + :collectibles [collectibles/view] + [activity/view])]))))