Fix small eth values display in GitHub comments

This commit is contained in:
Vitaliy Vlasov 2018-05-22 21:21:32 +03:00
parent a8600d1cbd
commit 8b44cac1f4
No known key found for this signature in database
GPG Key ID: A7D57C347F2B2964

View File

@ -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)