Remove unneeded args from deploy-contract fn

This commit is contained in:
Vitaliy Vlasov 2018-04-30 14:17:42 +03:00
parent 2ee5af98eb
commit 4ca3fcb833
2 changed files with 8 additions and 11 deletions

View File

@ -22,7 +22,7 @@
(let [labels (:labels issue)]
(some #(= label-name (:name %)) labels)))
(defn deploy-contract [owner owner-address repo issue-id issue-number]
(defn deploy-contract [owner-address issue-id]
(if (empty? owner-address)
(log/errorf "issue %s: Unable to deploy bounty contract because repo owner has no Ethereum addres" issue-id)
(try
@ -47,7 +47,7 @@
(log/debug "issue %s: Adding bounty for issue %s/%s - owner address: %s"
issue-id repo issue-number owner-address)
(if (= 1 created-issue)
(deploy-contract owner owner-address repo issue-id issue-number)
(deploy-contract owner-address issue-id)
(log/debug "issue %s: Issue already exists in DB, ignoring"))))
(defn maybe-add-bounty-for-issue [repo repo-id issue]

View File

@ -94,13 +94,10 @@
[]
(p :deploy-pending-contracts
(doseq [{issue-id :issue_id
issue-number :issue_number
owner :owner
owner-address :owner_address
repo :repo} (db-bounties/pending-contracts)]
owner-address :owner_address} (db-bounties/pending-contracts)]
(log/infof "issue %s: Trying to re-deploy failed bounty contract deployment" issue-id)
(try
(bounties/deploy-contract owner owner-address repo issue-id issue-number)
(bounties/deploy-contract owner-address issue-id)
(catch Throwable t
(log/errorf t "issue %s: deploy-pending-contracts exception: %s" issue-id (ex-data t)))))))