Skip to content

Commit

Permalink
buy-recurrent-assets feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayesivan committed May 24, 2024
1 parent 4bcced7 commit f63d714
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/status_im/contexts/wallet/sheets/buy_token/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
[status-im.contexts.wallet.sheets.buy-token.style :as style]
[utils.i18n :as i18n]
[oops.core :as oops]
[utils.re-frame :as rf]))
[utils.re-frame :as rf]
[status-im.feature-flags :as ff]))

(defn- crypto-on-ramp-item
[{:keys [name description fees logo-url site-url]}]
Expand Down Expand Up @@ -43,16 +44,19 @@
[selected-tab set-selected-tab] (rn/use-state initial-tab)]
[:<>
[quo/drawer-top {:title (i18n/label :t/buy-assets)}]
[quo/segmented-control
{:size 32
:container-style {:margin-horizontal 20
:margin-top 8
:margin-bottom 12}
:default-active initial-tab
:on-change set-selected-tab
:data tabs}]
(when (ff/enabled? ::ff/wallet.buy-recurrent-assets)
[quo/segmented-control
{:size 32
:container-style {:margin-horizontal 20
:margin-top 8
:margin-bottom 12}
:default-active initial-tab
:on-change set-selected-tab
:data tabs}])
[rn/flat-list
{:data (if (= selected-tab :one-time) crypto-on-ramps crypto-recurrent)
{:data (if (and (ff/enabled? ::ff/wallet.buy-recurrent-assets) (= selected-tab :recurrent))
crypto-recurrent
crypto-on-ramps)
:on-layout on-layout
:style (style/list-container min-height)
:render-fn crypto-on-ramp-item}]]))
1 change: 1 addition & 0 deletions src/status_im/feature_flags.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
::wallet.assets-modal-hide (enabled-in-env? :FLAG_ASSETS_MODAL_HIDE)
::wallet.assets-modal-manage-tokens (enabled-in-env? :FLAG_ASSETS_MODAL_MANAGE_TOKENS)
::wallet.bridge-token (enabled-in-env? :FLAG_BRIDGE_TOKEN_ENABLED)
::wallet.buy-recurrent-assets (enabled-in-env? :FLAG_BUY_RECURRENT_ASSETS)
::wallet.contacts (enabled-in-env? :FLAG_CONTACTS_ENABLED)
::wallet.edit-derivation-path (enabled-in-env? :FLAG_EDIT_DERIVATION_PATH)
::wallet.graph (enabled-in-env? :FLAG_GRAPH_ENABLED)
Expand Down

0 comments on commit f63d714

Please sign in to comment.