Skip to content

Commit

Permalink
progress
Browse files Browse the repository at this point in the history
  • Loading branch information
briansztamfater committed Nov 1, 2023
1 parent 94d7742 commit 2fdefba
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/status_im2/contexts/wallet/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,7 @@
:fx [[:dispatch
[:navigate-to-within-stack
[:wallet-select-asset :wallet-select-address]]]]}))

(rf/reg-event-fx :wallet/assets-for-account
(fn [{:keys [db]} [account]]
{:db (assoc db :wallet/account-assets {account [temp/token-value-eth]})}))
10 changes: 7 additions & 3 deletions src/status_im2/contexts/wallet/send/select_asset/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@
[reagent.core :as reagent]
[status-im2.contexts.wallet.send.select-asset.style :as style]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
[utils.re-frame :as rf]
[quo.foundations.resources :as quo.resources]
[status-im2.contexts.quo-preview.list-items.token-network :as token-network]))

(def tabs-data
[{:id :tab/assets :label (i18n/label :t/assets) :accessibility-label :assets-tab}
{:id :tab/collectibles :label (i18n/label :t/collectibles) :accessibility-label :collectibles-tab}])


(defn- asset-component
[]
(fn [_ _ _ _]
(fn [token-network _ _ _]
(let [_ {:on-press #(js/alert "Not implemented yet")
:active-state? false}]
[rn/view])))
[quo/token-network
token-network])))

(defn- asset-list
[]
Expand Down
17 changes: 16 additions & 1 deletion src/status_im2/contexts/wallet/temp.cljs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
(ns status-im2.contexts.wallet.temp
(:require [clojure.string :as string]
[status-im2.common.resources :as resources]
[status-im2.contexts.wallet.item-types :as types]))
[status-im2.contexts.wallet.item-types :as types]
[quo.foundations.resources :as quo.resources]))

(def ens-local-suggestion-saved-address-mock
{:type types/saved-address
Expand Down Expand Up @@ -44,3 +45,17 @@
(let [all-addresses [address-local-suggestion-saved-address-mock
address-local-suggestion-mock]]
(vec (filter #(string/starts-with? (:address %) substring) all-addresses))))

(def networks-list
[{:source (quo.resources/get-network :ethereum)}
{:source (quo.resources/get-network :optimism)}
{:source (quo.resources/get-network :arbitrum)}
{:source (quo.resources/get-network :zksync)}
{:source (quo.resources/get-network :polygon)}])

(def token-value-eth
{:token (quo.resources/get-token :eth)
:label "Ethereum"
:token-value "0.00 ETH"
:fiat-value "€0.00"
:networks networks-list})

0 comments on commit 2fdefba

Please sign in to comment.