cherry pick to release (#21038)
This commit is contained in:
parent
26fb0b20e7
commit
1c9d69416b
|
@ -3,14 +3,30 @@
|
|||
[quo.core :as quo]
|
||||
[react-native.core :as rn]
|
||||
[status-im.common.home.title-column.style :as style]
|
||||
[status-im.common.plus-button.view :as plus-button]))
|
||||
[status-im.common.plus-button.view :as plus-button]
|
||||
[utils.i18n :as i18n]))
|
||||
|
||||
(defn view
|
||||
[{:keys [label handler accessibility-label customization-color]}]
|
||||
[{:keys [beta? label handler accessibility-label customization-color]}]
|
||||
[rn/view style/title-column
|
||||
[rn/view {:flex 1}
|
||||
[rn/view
|
||||
{:style {:flex 1
|
||||
:align-items :center
|
||||
:flex-direction :row}}
|
||||
[quo/text style/title-column-text
|
||||
label]]
|
||||
label]
|
||||
(when beta?
|
||||
[rn/view
|
||||
{:style {:padding-top 6
|
||||
:padding-bottom 2}}
|
||||
[quo/tag
|
||||
{:accessibility-label :communities-chat-beta-tag
|
||||
:size 32
|
||||
:type :label
|
||||
:label (i18n/label :t/beta)
|
||||
:labelled? true
|
||||
:blurred? false}]])]
|
||||
|
||||
(when handler
|
||||
[plus-button/plus-button
|
||||
{:on-press handler
|
||||
|
|
|
@ -118,7 +118,8 @@
|
|||
(defn- banner-data
|
||||
[profile-link]
|
||||
{:title-props
|
||||
{:label (i18n/label :t/messages)
|
||||
{:beta? true
|
||||
:label (i18n/label :t/messages)
|
||||
:handler #(rf/dispatch
|
||||
[:show-bottom-sheet {:content chat.actions.view/new-chat}])
|
||||
:accessibility-label :new-chat-button}
|
||||
|
|
|
@ -64,7 +64,8 @@
|
|||
|
||||
(def ^:private banner-data
|
||||
{:title-props
|
||||
{:label (i18n/label :t/communities)
|
||||
{:beta? true
|
||||
:label (i18n/label :t/communities)
|
||||
:handler (when config/fast-create-community-enabled?
|
||||
#(rf/dispatch [:show-bottom-sheet {:content actions.home-plus/view}]))
|
||||
:accessibility-label :new-communities-button}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
[status-im.contexts.wallet.sheets.buy-token.view :as buy-token]
|
||||
[status-im.feature-flags :as ff]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.money :as money]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(defn- action-buy
|
||||
|
@ -21,6 +22,7 @@
|
|||
{:icon :i/send
|
||||
:accessibility-label :send
|
||||
:label (i18n/label :t/send)
|
||||
:disabled? (:disabled? send-params)
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:hide-bottom-sheet])
|
||||
(rf/dispatch [:wallet/clean-send-data])
|
||||
|
@ -69,31 +71,35 @@
|
|||
|
||||
(defn token-value-drawer
|
||||
[token watch-only? entry-point]
|
||||
(let [token-symbol (:token token)
|
||||
token-data (first (rf/sub [:wallet/current-viewing-account-tokens-filtered
|
||||
token-symbol]))
|
||||
selected-account? (rf/sub [:wallet/current-viewing-account-address])
|
||||
token-owners (rf/sub [:wallet/operable-addresses-with-token-symbol token-symbol])
|
||||
send-params (if selected-account?
|
||||
{:token token-data
|
||||
:stack-id :screen/wallet.accounts
|
||||
:start-flow? true
|
||||
:owners token-owners}
|
||||
{:token-symbol token-symbol
|
||||
:stack-id :wallet-stack
|
||||
:start-flow? true
|
||||
:owners token-owners})
|
||||
bridge-params (if selected-account?
|
||||
{:token token-data
|
||||
:bridge-disabled? (send-utils/bridge-disabled? token-symbol)
|
||||
:stack-id :screen/wallet.accounts
|
||||
:start-flow? true
|
||||
:owners token-owners}
|
||||
{:token-symbol token-symbol
|
||||
:bridge-disabled? (send-utils/bridge-disabled? token-symbol)
|
||||
:stack-id :wallet-stack
|
||||
:start-flow? true
|
||||
:owners token-owners})]
|
||||
(let [token-symbol (:token token)
|
||||
token-data (first (rf/sub [:wallet/current-viewing-account-tokens-filtered
|
||||
token-symbol]))
|
||||
fiat-unformatted-value (get-in token [:values :fiat-unformatted-value])
|
||||
has-balance? (money/greater-than fiat-unformatted-value (money/bignumber "0"))
|
||||
selected-account? (rf/sub [:wallet/current-viewing-account-address])
|
||||
token-owners (rf/sub [:wallet/operable-addresses-with-token-symbol token-symbol])
|
||||
send-params (if selected-account?
|
||||
{:token token-data
|
||||
:stack-id :screen/wallet.accounts
|
||||
:disabled? (not has-balance?)
|
||||
:start-flow? true
|
||||
:owners token-owners}
|
||||
{:token-symbol token-symbol
|
||||
:stack-id :wallet-stack
|
||||
:start-flow? true
|
||||
:owners token-owners})
|
||||
bridge-params (if selected-account?
|
||||
{:token token-data
|
||||
:bridge-disabled? (or (not has-balance?)
|
||||
(send-utils/bridge-disabled? token-symbol))
|
||||
:stack-id :screen/wallet.accounts
|
||||
:start-flow? true
|
||||
:owners token-owners}
|
||||
{:token-symbol token-symbol
|
||||
:bridge-disabled? (send-utils/bridge-disabled? token-symbol)
|
||||
:stack-id :wallet-stack
|
||||
:start-flow? true
|
||||
:owners token-owners})]
|
||||
[quo/action-drawer
|
||||
[(cond->> [(when (ff/enabled? ::ff/wallet.assets-modal-manage-tokens)
|
||||
(action-manage-tokens watch-only?))
|
||||
|
|
|
@ -186,6 +186,7 @@
|
|||
"balance": "Balance",
|
||||
"begin-set-up": "Begin setup",
|
||||
"below-base-fee": "max fee below base fee",
|
||||
"beta": "Beta",
|
||||
"bio": "Bio",
|
||||
"bio-added": "Bio added",
|
||||
"bio-is-too-long": "Bio is too long",
|
||||
|
|
Loading…
Reference in New Issue