mirror of
https://github.com/status-im/open-bounty.git
synced 2025-01-12 18:44:38 +00:00
Github comment improvements
* add missing "ETH" to github comment * use 6 decimals instead of 8 for github comment + image
This commit is contained in:
parent
209698c170
commit
2bb7790768
@ -191,19 +191,18 @@
|
||||
(defn generate-open-comment
|
||||
[owner repo issue-number contract-address balance balance-str]
|
||||
(let [image-url (md-image "QR Code" (get-qr-url owner repo issue-number balance))
|
||||
balance (str balance-str " ETH")
|
||||
site-url (md-url (server-address) (server-address))]
|
||||
(format (str "Current balance: %s\n"
|
||||
(format (str "Current balance: %s ETH\n"
|
||||
"Contract address: %s\n"
|
||||
"%s\n"
|
||||
(network-text)
|
||||
"To claim this bounty sign up at %s")
|
||||
balance-str contract-address image-url site-url)))
|
||||
balance contract-address image-url site-url)))
|
||||
|
||||
|
||||
(defn generate-merged-comment
|
||||
[contract-address balance-str winner-login]
|
||||
(format (str "Balance: %s\n"
|
||||
(format (str "Balance: %s ETH\n"
|
||||
"Contract address: %s\n"
|
||||
(network-text)
|
||||
"Status: pending maintainer confirmation\n"
|
||||
@ -212,7 +211,7 @@
|
||||
|
||||
(defn generate-paid-comment
|
||||
[contract-address balance-str payee-login]
|
||||
(format (str "Balance: %s\n"
|
||||
(format (str "Balance: %s ETH\n"
|
||||
"Contract address: %s\n"
|
||||
(network-text)
|
||||
"Paid to: %s\n")
|
||||
|
@ -27,7 +27,7 @@
|
||||
repo :repo
|
||||
comment-id :comment_id
|
||||
issue-number :issue_number} issue
|
||||
balance-str (eth/get-balance-eth contract-address 8)
|
||||
balance-str (eth/get-balance-eth contract-address 6)
|
||||
balance (read-string balance-str)]
|
||||
(bounties/update-bounty-comment-image issue-id
|
||||
owner
|
||||
@ -158,7 +158,7 @@
|
||||
old-balance :balance
|
||||
issue-number :issue_number} (db-bounties/open-bounty-contracts)]
|
||||
(when comment-id
|
||||
(let [current-balance-eth-str (eth/get-balance-eth contract-address 8)
|
||||
(let [current-balance-eth-str (eth/get-balance-eth contract-address 6)
|
||||
current-balance-eth (read-string current-balance-eth-str)]
|
||||
(log/debug "update-balances" current-balance-eth
|
||||
current-balance-eth-str owner repo issue-number)
|
||||
|
@ -3,7 +3,9 @@
|
||||
[clojure.data.json :as json]))
|
||||
|
||||
|
||||
(defn get-token-usd-price [token]
|
||||
(defn get-token-usd-price
|
||||
"Get current USD value for a token using cryptonator API"
|
||||
[token]
|
||||
(let [url (str "https://api.cryptonator.com/api/ticker/"
|
||||
token
|
||||
"-usd")
|
||||
|
Loading…
x
Reference in New Issue
Block a user