Improve readability of :confirm-payout handler

* clarify use of "magic" hex-string with comment and variable name in
  :confirm-payout handler
This commit is contained in:
Teemu Patja 2017-08-24 18:31:44 +03:00
parent 122f76cffe
commit 342cefff56
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C
1 changed files with 4 additions and 1 deletions

View File

@ -347,10 +347,13 @@
contract-address :contract_address
confirm-hash :confirm_hash} issue]]
(let [send-transaction-fn (aget js/web3 "eth" "sendTransaction")
confirm-transaction-methodid "0xc01a8c84"
;; confirmTransaction(uint256)
payload {:from owner-address
:to contract-address
:value 0
:data (str "0xc01a8c84" confirm-hash)}]
:data (str confirm-transaction-methodid
confirm-hash)}]
(try
(apply send-transaction-fn [(clj->js payload)
(send-transaction-callback issue-id)])