diff --git a/src/clj/pmagnus/btcprice/web/routes/ws_proxy.clj b/src/clj/pmagnus/btcprice/web/routes/ws_proxy.clj index 3fc3232..4efac3e 100644 --- a/src/clj/pmagnus/btcprice/web/routes/ws_proxy.clj +++ b/src/clj/pmagnus/btcprice/web/routes/ws_proxy.clj @@ -117,9 +117,12 @@ amount)) "\u2014")) +(def ^:private sats-eur-amount + (double (bigdec (or (System/getenv "SATS_EUR_AMOUNT") "54.46")))) + (defn- eur-to-sats [rates] (when-let [eur-btc (get rates "EUR/BTC")] - (long (* 54 (double (bigdec eur-btc)) 100000000)))) + (long (* sats-eur-amount (double (bigdec eur-btc)) 100000000)))) (defn- strike-json->html [text] (let [rates (json/read-str text)