                                      (add-padding to)]}]}
         payload (.stringify js/JSON (clj->js args))]
     (status/call-web3-private payload
-                              (response-handler block-number chain direction ethereum/handle-error cb))))
+                              (response-handler web3 current-block-number chain direction ethereum/handle-error cb))))
 
 (defn get-token-transactions
   [web3 network contracts direction address cb]
   (ethereum/get-block-number web3
-                             #(get-token-transfer-logs % network contracts direction address cb)))
+                             #(get-token-transfer-logs web3 % network contracts direction address cb)))

  (if topic
    (str "0x" (subs topic 26))))

(defn- parse-transaction-entry [block-number chain direction entries]
  (into {}
        (for [entry entries]
          (let [token (->> entry :address (tokens/address->token chain))]
            [(:transactionHash entry)
             {:block         (-> entry :blockNumber ethereum/hex->int str)
              :hash          (:transactionHash entry)
              :symbol        (:symbol token)
              :from          (-> entry :topics second remove-padding)
              :to            (-> entry :topics last remove-padding)
              :value         (-> entry :data ethereum/hex->bignumber)
              :type          direction

              :confirmations (str (- block-number (-> entry :blockNumber ethereum/hex->int)))

              :gas-price     nil
              :nonce         nil
              :data          nil

              :gas-limit     nil
              ;; NOTE(goranjovic) - timestamp is mocked to the current time so that the transaction is shown at the
              ;; top of transaction history list between the moment when transfer event was detected and actual
              ;; timestamp was retrieved from block info.
              :timestamp     (str (datetime/timestamp))

              :gas-used      nil


              ;; confirmations count.
              :transfer      true}]))))

(defn add-block-info [web3 current-block-number chain direction result success-fn]
  (let [transfers-by-block (group-by :blockNumber result)]
    (doseq [[block-number transfers] transfers-by-block]
      (ethereum/get-block-info web3 (ethereum/hex->int block-number)
                               (fn [block-info]
                                 (success-fn (parse-transaction-entries current-block-number
                                                                        block-info
                                                                        chain
                                                                        direction
                                                                        transfers)))))))

(defn- response-handler [web3 current-block-number chain direction error-fn success-fn]
  (fn handle-response
    ([response]
     (let [{:keys [error result]} (parse-json response)]
