Skip to content

Commit

Permalink
add buy token
Browse files Browse the repository at this point in the history
  • Loading branch information
mmilad75 authored and VolodLytvynenko committed Apr 16, 2024
1 parent 75ff916 commit 031be1d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 13 deletions.
14 changes: 2 additions & 12 deletions src/status_im/contexts/wallet/account/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,10 @@
[status-im.contexts.wallet.account.style :as style]
[status-im.contexts.wallet.account.tabs.view :as tabs]
[status-im.contexts.wallet.common.account-switcher.view :as account-switcher]
[status-im.contexts.wallet.common.temp :as temp]
[status-im.contexts.wallet.sheets.buy-token.view :as buy-token]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))

(defn buy-drawer
[]
[:<>
[quo/drawer-top {:title (i18n/label :t/buy-tokens)}]
[rn/flat-list
{:data temp/buy-tokens-list
:style {:padding-horizontal 8
:padding-bottom 8}
:render-fn quo/settings-item}]])

(def first-tab-id :assets)

(defn tabs-data
Expand Down Expand Up @@ -55,7 +45,7 @@
:flow-id :wallet-flow}]))
:receive-action #(rf/dispatch [:open-modal :screen/wallet.share-address {:status :receive}])
:buy-action #(rf/dispatch [:show-bottom-sheet
{:content buy-drawer}])
{:content buy-token/view}])
:bridge-action #(rf/dispatch [:wallet/start-bridge])}])
[quo/tabs
{:style style/tabs
Expand Down
4 changes: 3 additions & 1 deletion src/status_im/contexts/wallet/common/token_value/view.cljs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(ns status-im.contexts.wallet.common.token-value.view
(:require [quo.core :as quo]
[status-im.contexts.wallet.sheets.buy-token.view :as buy-token]
[status-im.feature-flags :as ff]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
Expand All @@ -9,7 +10,8 @@
{:icon :i/buy
:accessibility-label :buy
:label (i18n/label :t/buy)
:on-press #(js/alert "to be implemented")
:on-press #(rf/dispatch [:show-bottom-sheet
{:content buy-token/view}])
:right-icon :i/external})

(defn- action-send
Expand Down
5 changes: 5 additions & 0 deletions src/status_im/contexts/wallet/sheets/buy_token/style.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(ns status-im.contexts.wallet.sheets.buy-token.style)

(def list-container
{:padding-horizontal 8
:padding-bottom 8})
15 changes: 15 additions & 0 deletions src/status_im/contexts/wallet/sheets/buy_token/view.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
(ns status-im.contexts.wallet.sheets.buy-token.view
(:require [quo.core :as quo]
[react-native.core :as rn]
[status-im.contexts.wallet.common.temp :as temp]
[status-im.contexts.wallet.sheets.buy-token.style :as style]
[utils.i18n :as i18n]))

(defn view
[]
[:<>
[quo/drawer-top {:title (i18n/label :t/buy-tokens)}]
[rn/flat-list
{:data temp/buy-tokens-list
:style style/list-container
:render-fn quo/settings-item}]])

0 comments on commit 031be1d

Please sign in to comment.