   [[_ tx-data]]
   (datsync/apply-remote-tx! db/conn tx-data))
 
-(defmethod event-msg-handler :datsync.client/bootstrap
+(defmethod push-msg-handler :datsync.client/bootstrap
   [[_ tx-data]]
   ;; Possibly falg some state somewhere saying bootstrap has taken place?
+  (println "Recieved tx")
+  ;(doseq [x-form (remove :db/id tx-data)]
+    ;(println "    " x-form))
   (datsync/apply-remote-tx! db/conn tx-data))
 
-;; ## TODO Add any custom handlers here!
+;; TODO Add any custom handlers here!
 
 
 

;; Set up push message handler

; Dispatch on event key which is 1st elem in vector
(defmulti push-msg-handler
  (fn [[id _]] id))

(defmethod event-msg-handler :chsk/recv
  [{:as ev-msg :keys [?data]}]

(defn send-tx! [conn tx]
  (chsk-send! [:datsync.client/tx (datsync/datomic-tx conn tx)]))


(sente/start-chsk-router! ch-chsk event-msg-handler)


