From 342cefff5639e28f2e72603b1c58ec51a99865ec Mon Sep 17 00:00:00 2001 From: Teemu Patja Date: Thu, 24 Aug 2017 18:31:44 +0300 Subject: [PATCH] Improve readability of :confirm-payout handler * clarify use of "magic" hex-string with comment and variable name in :confirm-payout handler --- src/cljs/commiteth/handlers.cljs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cljs/commiteth/handlers.cljs b/src/cljs/commiteth/handlers.cljs index 4db5fff..3fb39c9 100644 --- a/src/cljs/commiteth/handlers.cljs +++ b/src/cljs/commiteth/handlers.cljs @@ -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)])