Fix token images not being displayed (#18288)

Signed-off-by: Brian Sztamfater <brian@status.im>
This commit is contained in:
Ulises Manuel 2023-12-27 09:43:47 -06:00 committed by GitHub
parent 01e8c7e480
commit 107d1a80c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -3,12 +3,13 @@
(:require [clojure.string :as string]))
(def ^:private tokens (loader/resolve-tokens))
(def ^:private safe-lower-case (comp string/lower-case str))
(defn- get-token-image*
[token]
(let [token-symbol (cond-> token
(keyword? token) name
:always (comp string/lower-case str))]
:always safe-lower-case)]
(get tokens token-symbol)))
(def get-token-image (memoize get-token-image*))