feat_: Add swap option in wallet action drawer (#20029)

This commit is contained in:
Ajay Sivan 2024-05-16 19:21:21 +05:30 committed by GitHub
parent d73c38a00c
commit 3e33ccb9ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,6 @@
(ns status-im.contexts.wallet.common.token-value.view
(:require [quo.core :as quo]
[status-im.common.not-implemented :as not-implemented]
[status-im.contexts.wallet.sheets.buy-token.view :as buy-token]
[status-im.feature-flags :as ff]
[utils.i18n :as i18n]
@ -40,6 +41,13 @@
(rf/dispatch [:hide-bottom-sheet])
(rf/dispatch [:wallet/bridge-select-token {:token token-data}]))})
(defn- action-swap
[]
{:icon :i/swap
:accessibility-label :swap
:label (i18n/label :t/swap)
:on-press #(not-implemented/alert)})
(defn- action-manage-tokens
[watch-only?]
{:icon :i/settings
@ -73,6 +81,7 @@
(not watch-only?) (concat [(action-buy)
(action-send send-params)
(action-receive)
(when (ff/enabled? ::ff/wallet.swap) (action-swap))
(action-bridge token-data)]))]]))
(defn view