mirror of
https://github.com/status-im/status-react.git
synced 2025-02-23 16:18:32 +00:00
14 lines
472 B
Clojure
14 lines
472 B
Clojure
(ns status-im.utils.identicon
|
|
(:require [status-im.js-dependencies :as dependencies]))
|
|
|
|
(def default-size 40)
|
|
|
|
(defn identicon
|
|
([hash] (identicon hash (clj->js {:background [255 255 255 255]
|
|
:margin 0.24
|
|
:size default-size})))
|
|
([hash options]
|
|
(str "data:image/png;base64,"
|
|
(let [identicon-js (dependencies/identicon-js)]
|
|
(str (new identicon-js hash options))))))
|