fix no icon for ETH in 1-1 transaction messages (#13898)

This commit is contained in:
Parvesh Monu 2022-08-31 20:49:33 +05:30 committed by GitHub
parent 04b69181f2
commit 698e548c6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 12 deletions

View File

@ -24,19 +24,10 @@
(defn network->icon [network]
(let [s (str "./resources/images/tokens/" (name network) "/0-native.png")
s-js (str "." s)
image (gensym)]
s-js (str "." s)]
(if (.exists (io/file s))
`(let [~image (atom nil)]
(fn []
(or @~image
(reset! ~image (js/require ~s-js)))))
`(let [~image (atom nil)]
(fn []
(or
@~image
(reset! ~image
(js/require "../resources/images/tokens/default-token.png"))))))))
`(js/require ~s-js)
`(js/require "../resources/images/tokens/default-token.png"))))
(defmacro resolve-native-currency-icons
"In react-native arguments to require must be static strings.