fix no icon for ETH in 1-1 transaction messages (#13898)
This commit is contained in:
parent
04b69181f2
commit
698e548c6d
|
@ -24,19 +24,10 @@
|
||||||
|
|
||||||
(defn network->icon [network]
|
(defn network->icon [network]
|
||||||
(let [s (str "./resources/images/tokens/" (name network) "/0-native.png")
|
(let [s (str "./resources/images/tokens/" (name network) "/0-native.png")
|
||||||
s-js (str "." s)
|
s-js (str "." s)]
|
||||||
image (gensym)]
|
|
||||||
(if (.exists (io/file s))
|
(if (.exists (io/file s))
|
||||||
`(let [~image (atom nil)]
|
`(js/require ~s-js)
|
||||||
(fn []
|
`(js/require "../resources/images/tokens/default-token.png"))))
|
||||||
(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"))))))))
|
|
||||||
|
|
||||||
(defmacro resolve-native-currency-icons
|
(defmacro resolve-native-currency-icons
|
||||||
"In react-native arguments to require must be static strings.
|
"In react-native arguments to require must be static strings.
|
||||||
|
|
Loading…
Reference in New Issue