From 8b44cac1f469049428007a927f984332aa431df8 Mon Sep 17 00:00:00 2001 From: Vitaliy Vlasov Date: Tue, 22 May 2018 21:21:32 +0300 Subject: [PATCH] Fix small eth values display in GitHub comments --- src/clj/commiteth/github/core.clj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/clj/commiteth/github/core.clj b/src/clj/commiteth/github/core.clj index 8d31b5d..c64d774 100644 --- a/src/clj/commiteth/github/core.clj +++ b/src/clj/commiteth/github/core.clj @@ -247,7 +247,7 @@ (if (on-testnet?) "To fund it, send test ETH or test ERC20/ERC223 tokens to the contract address." "To fund it, send ETH or ERC20/ERC223 tokens to the contract address.")) - eth-balance image-url site-url))) + (.toPlainString (bigdec eth-balance)) image-url site-url))) (defn learn-more-text [] (let [site-url (md-url (server-address) (server-address))] @@ -264,17 +264,17 @@ "Pending maintainer confirmation") "\n") "Winner: %s\n" (learn-more-text)) - eth-balance winner-login)) + (.toPlainString (bigdec eth-balance)) winner-login)) (defn generate-paid-comment - [contract-address eth-balance-str tokens payee-login] + [contract-address eth-balance tokens payee-login] (format (str "Balance: %s ETH\n" (token-balances-text tokens) (contract-addr-text contract-address) (network-text) "Paid to: %s\n" (learn-more-text)) - eth-balance-str payee-login)) + (.toPlainString (bigdec eth-balance)) payee-login)) (defn make-patch-request [end-point positional query] (let [{:keys [auth oauth-token] @@ -299,7 +299,7 @@ issue-url (str owner "/" repo "/issues/" (str issue-number)) png-data (png-rendering/gen-comment-image contract-address - balance-eth + (.toPlainString (bigdec balance-eth)) tokens issue-url)] (log/debug "update-bounty-comment-image" issue-id owner repo issue-number)