mirror of
https://github.com/status-im/status-react.git
synced 2025-01-11 11:34:45 +00:00
Assets not sorted by fiat balance on 'Assets to pay' and 'Assets to receive' screens (#21636)
This commit is contained in:
parent
a821ec5a14
commit
84a3fffe9f
@ -404,15 +404,13 @@
|
|||||||
:market-values-per-token market-values-per-token}))
|
:market-values-per-token market-values-per-token}))
|
||||||
calculated-tokens (map calculate-token tokens)]
|
calculated-tokens (map calculate-token tokens)]
|
||||||
(sort-by (fn [token]
|
(sort-by (fn [token]
|
||||||
(let [fiat-value (get-in token [:values :fiat-unformatted-value])
|
(let [fiat-value (get-in token [:values :fiat-unformatted-value])]
|
||||||
priority (get constants/token-sort-priority (:token token) ##Inf)]
|
[(- fiat-value)]))
|
||||||
[(- fiat-value) priority]))
|
|
||||||
calculated-tokens)))
|
calculated-tokens)))
|
||||||
|
|
||||||
(defn sort-tokens
|
(defn sort-tokens
|
||||||
[tokens]
|
[tokens]
|
||||||
(let [priority #(get constants/token-sort-priority (:symbol %) ##Inf)]
|
(sort-by (fn [token] (- (:balance token))) tokens))
|
||||||
(sort-by (juxt (comp - :balance) priority) tokens)))
|
|
||||||
|
|
||||||
(defn- transaction-data
|
(defn- transaction-data
|
||||||
[{:keys [from-address to-address token-address route data eth-transfer?]}]
|
[{:keys [from-address to-address token-address route data eth-transfer?]}]
|
||||||
@ -543,8 +541,7 @@
|
|||||||
|
|
||||||
(defn sort-tokens-by-name
|
(defn sort-tokens-by-name
|
||||||
[tokens]
|
[tokens]
|
||||||
(let [priority #(get constants/token-sort-priority (:symbol %) ##Inf)]
|
(sort-by :symbol tokens))
|
||||||
(sort-by (juxt :symbol priority) tokens)))
|
|
||||||
|
|
||||||
(defn tokens-with-balance
|
(defn tokens-with-balance
|
||||||
[tokens networks chain-ids]
|
[tokens networks chain-ids]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user