Compare commits

...
Author SHA1 Message Date
Mohamed Javid a42289f387 [Fix] Token name display in accounts home
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-12-09 02:23:22 +05:30
5 changed files with 11 additions and 18 deletions
@@ -1,12 +1,10 @@
(ns quo.components.list-items.token-value.view
(:require
[clojure.string :as string]
[quo.components.icon :as icon]
[quo.components.list-items.token-value.style :as style]
[quo.components.markdown.text :as text]
[quo.components.utilities.token.view :as token]
[quo.foundations.colors :as colors]
[quo.foundations.common :as common]
[quo.theme :as quo.theme]
[react-native.core :as rn]
[reagent.core :as reagent]))
@@ -14,7 +12,8 @@
(defn- internal-view
[]
(let [state (reagent/atom :default)]
(fn [{:keys [theme customization-color status token metrics? values on-press on-long-press]}]
(fn [{:keys [theme customization-color status token metrics? values on-press
on-long-press]}]
(let [bg-opacity (case @state
:active 10
:pressed 5
@@ -34,13 +33,13 @@
{:style {:flex-direction :row
:align-items :center
:flex 1}}
[token/view {:token token :size :size-32}]
[token/view {:token (:symbol token) :size :size-32}]
[rn/view {:style {:margin-left 8}}
[text/text {:weight :semi-bold} (common/token-label token)]
[text/text {:weight :semi-bold} (:name token)]
[text/text
{:size :paragraph-2
:style {:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)}}
(str crypto-value " " (if token (string/upper-case (clj->js token)) ""))]]]
(str crypto-value " " (:symbol token))]]]
[rn/view
{:style {:align-items :flex-end
:justify-content :space-between}}
-5
View File
@@ -3,8 +3,3 @@
(def currency-label
{:eur "€"
:usd "$"})
(def token-label
{:eth "Ethereum"
:snt "Status"
:dai "Dai"})
@@ -5,11 +5,7 @@
[status-im2.contexts.quo-preview.preview :as preview]))
(def descriptor
[{:key :token
:type :select
:options [{:key :eth}
{:key :snt}]}
{:key :status
[{:key :status
:type :select
:options [{:key :empty}
{:key :positive}
@@ -19,7 +15,8 @@
(defn view
[]
(let [state (reagent/atom {:token :snt
(let [state (reagent/atom {:token {:symbol "SNT"
:name "Status Network Token"}
:state :default
:status :empty
:customization-color :blue
@@ -16,6 +16,7 @@
(case selected-tab
:assets [rn/flat-list
{:render-fn token-value/view
:style {:flex 1}
:data tokens
:content-container-style {:padding-horizontal 8}}]
:collectibles [collectibles/view]
+2 -1
View File
@@ -104,7 +104,8 @@
{:keys [price change-pct-24hour]} market-values
fiat-change (utils/calculate-fiat-change crypto-value change-pct-24hour)]
(when crypto-value
{:token (keyword (string/lower-case (:symbol item)))
{:token {:symbol (:symbol item)
:name (:name item)}
:state :default
:status (cond
(pos? change-pct-24hour) :positive