Browse Source

refactor: remove unnecessary ldb/read-transit-str

rcmerci 8 months ago
parent
commit
961a143aa1

+ 1 - 1
src/main/frontend/components/content.cljs

@@ -357,7 +357,7 @@
                   (let [worker @db-browser/*worker
                         token (state/get-auth-id-token)
                         graph-uuid (ldb/get-graph-rtc-uuid (db/get-db))]
-                    (p/let [blocks-versions (worker :rtc/get-block-content-versions token graph-uuid (str block-id))]
+                    (p/let [blocks-versions (worker :rtc/get-block-content-versions token graph-uuid block-id)]
                       (prn :Dev-show-block-content-history)
                       (doseq [[block-uuid versions] blocks-versions]
                         (prn :block-uuid block-uuid)

+ 5 - 7
src/main/frontend/db/async.cljs

@@ -151,9 +151,8 @@
         (swap! *async-queries assoc [name' opts] true)
         (state/update-state! :db/async-query-loading (fn [s] (conj s name')))
         (p/let [{:keys [properties block children] :as result'}
-                (worker :general/get-block-and-children graph id (ldb/write-transit-str
-                                                                  {:children? children?
-                                                                   :nested-children? nested-children?}))
+                (worker :general/get-block-and-children graph id {:children? children?
+                                                                  :nested-children? nested-children?})
                 conn (db/get-db graph false)
                 block-and-children (concat properties [block] children)
                 _ (d/transact! conn block-and-children)
@@ -183,10 +182,9 @@
     (when-let [^Object worker @db-browser/*worker]
       (p/let [result (worker :general/get-block-and-children
                              (state/get-current-repo)
-                             (str (:block/uuid page))
-                             (ldb/write-transit-str
-                              {:children? true
-                               :nested-children? false}))]
+                             (:block/uuid page)
+                             {:children? true
+                              :nested-children? false})]
         (:children result)))))
 
 (defn <get-block-refs

+ 2 - 3
src/main/frontend/db/async/util.cljs

@@ -3,7 +3,6 @@
   (:require [datascript.core :as d]
             [frontend.db.conn :as db-conn]
             [frontend.state :as state]
-            [logseq.db :as ldb]
             [promesa.core :as p]))
 
 (defn <q
@@ -17,7 +16,7 @@
       (if async-requested?
         (let [db (db-conn/get-db graph)]
           (apply d/q (first inputs) db (rest inputs)))
-        (p/let [result (worker :general/q graph (ldb/write-transit-str inputs))]
+        (p/let [result (worker :general/q graph inputs)]
           (swap! *async-queries assoc [inputs opts] true)
           (when result
             (when (and transact-db? (seq result) (coll? result))
@@ -42,7 +41,7 @@
    (<pull graph '[*] id))
   ([graph selector id]
    (when-let [worker @state/*db-worker]
-     (p/let [result' (worker :general/pull graph (ldb/write-transit-str selector) (ldb/write-transit-str id))]
+     (p/let [result' (worker :general/pull graph selector id)]
        (when result'
          (when-let [conn (db-conn/get-db graph false)]
            (d/transact! conn [result']))

+ 3 - 4
src/main/frontend/db/rtc/debug_ui.cljs

@@ -9,7 +9,6 @@
             [frontend.state :as state]
             [frontend.ui :as ui]
             [frontend.util :as util]
-            [logseq.db :as ldb]
             [logseq.db.frontend.schema :as db-schema]
             [logseq.shui.ui :as shui]
             [missionary.core :as m]
@@ -160,8 +159,8 @@
                                     (let [worker @db-browser/*worker]
                                       (worker :rtc/grant-graph-access
                                               token graph-uuid
-                                              (some-> user-uuid vector ldb/write-transit-str)
-                                              (some-> user-email vector ldb/write-transit-str))))))})
+                                              (some-> user-uuid vector)
+                                              (some-> user-email vector))))))})
 
         [:b "➡️"]
         [:input.form-input.my-2.py-1
@@ -330,7 +329,7 @@
                         (when-let [token (state/get-auth-id-token)]
                           (when-let [device-uuid (not-empty (:sync-private-key-device-uuid keys-state))]
                             (worker :rtc/sync-current-graph-encrypted-aes-key
-                                    token (ldb/write-transit-str [(parse-uuid device-uuid)]))))))}
+                                    token [(parse-uuid device-uuid)])))))}
          "Sync CurrentGraph EncryptedAesKey")
         [:input.form-input.my-2.py-1.w-32
          {:on-change (fn [e] (swap! *keys-state assoc :sync-private-key-device-uuid (util/evalue e)))

+ 8 - 7
src/main/frontend/handler/db_based/export.cljs

@@ -8,7 +8,6 @@
             [frontend.util :as util]
             [frontend.util.page :as page-util]
             [goog.dom :as gdom]
-            [logseq.db :as ldb]
             [promesa.core :as p]))
 
 (defn ^:export export-block-data []
@@ -17,7 +16,7 @@
     (when-let [worker @state/*db-worker]
       (p/let [result (worker :general/export-edn
                              (state/get-current-repo)
-                             (ldb/write-transit-str {:export-type :block :block-id [:block/uuid block-uuid]}))
+                             {:export-type :block :block-id [:block/uuid block-uuid]})
               pull-data (with-out-str (pprint/pprint result))]
         (.writeText js/navigator.clipboard pull-data)
         (println pull-data)
@@ -29,7 +28,7 @@
     (when-let [worker @state/*db-worker]
       (p/let [result (worker :general/export-edn
                              (state/get-current-repo)
-                             (ldb/write-transit-str {:export-type :view-nodes :node-ids block-uuids}))
+                             {:export-type :view-nodes :node-ids block-uuids})
               pull-data (with-out-str (pprint/pprint result))]
         (.writeText js/navigator.clipboard pull-data)
         (println pull-data)
@@ -39,7 +38,8 @@
   (if-let [page-id (page-util/get-current-page-id)]
     (when-let [worker @state/*db-worker]
       (p/let [result (worker :general/export-edn
-                             (state/get-current-repo) (ldb/write-transit-str {:export-type :page :page-id page-id}))
+                             (state/get-current-repo)
+                             {:export-type :page :page-id page-id})
               pull-data (with-out-str (pprint/pprint result))]
         (.writeText js/navigator.clipboard pull-data)
         (println pull-data)
@@ -49,7 +49,8 @@
 (defn ^:export export-graph-ontology-data []
   (when-let [worker @state/*db-worker]
     (p/let [result (worker :general/export-edn
-                           (state/get-current-repo) (ldb/write-transit-str {:export-type :graph-ontology}))
+                           (state/get-current-repo)
+                           {:export-type :graph-ontology})
             pull-data (with-out-str (pprint/pprint result))]
       (.writeText js/navigator.clipboard pull-data)
       (println pull-data)
@@ -61,8 +62,8 @@
   (when-let [worker @state/*db-worker]
     (p/let [result (worker :general/export-edn
                            (state/get-current-repo)
-                           (ldb/write-transit-str {:export-type :graph
-                                                   :graph-options {:include-timestamps? true}}))
+                           {:export-type :graph
+                            :graph-options {:include-timestamps? true}})
             pull-data (with-out-str (pprint/pprint result))]
       pull-data)))
 

+ 2 - 4
src/main/frontend/handler/db_based/rtc.cljs

@@ -158,7 +158,7 @@
     (when-let [worker @state/*db-worker]
       (p/let [token (state/get-auth-id-token)
               repo (state/get-current-repo)
-              result (worker :rtc/get-users-info token (str graph-uuid))]
+              result (worker :rtc/get-users-info token graph-uuid)]
         (state/set-state! :rtc/users-info {repo result})))))
 
 (defn <rtc-invite-email
@@ -168,9 +168,7 @@
       (->
        (p/do!
         (worker :rtc/grant-graph-access
-                token (str graph-uuid)
-                (ldb/write-transit-str [])
-                (ldb/write-transit-str [email]))
+                token (str graph-uuid) [] [email])
         (notification/show! "Invitation sent!" :success))
        (p/catch (fn [e]
                   (notification/show! "Something wrong, please try again." :error)

+ 1 - 2
src/main/frontend/handler/editor/lifecycle.cljs

@@ -4,7 +4,6 @@
             [frontend.util :as util]
             [goog.dom :as gdom]
             [frontend.db :as db]
-            [logseq.db :as ldb]
             [dommy.core :as dom]
             ;; [clojure.string :as string]
             ;; [frontend.handler.block :as block-handler]
@@ -38,7 +37,7 @@
             page-id (:block/uuid (:block/page (db/entity (:db/id (state/get-edit-block)))))
             repo (state/get-current-repo)]
         (when page-id
-          (worker :undo-redo/record-editor-info repo (str page-id) (ldb/write-transit-str (state/get-editor-info))))))
+          (worker :undo-redo/record-editor-info repo (str page-id) (state/get-editor-info)))))
 
     (state/set-state! :editor/op nil))
   state)

+ 1 - 1
src/main/frontend/handler/events.cljs

@@ -367,7 +367,7 @@
                  :pages-directory (config/get-pages-directory)}
         worker @state/*db-worker]
     (when worker
-      (worker :general/set-context (ldb/write-transit-str context)))))
+      (worker :general/set-context context))))
 
 ;; Hook on a graph is ready to be shown to the user.
 ;; It's different from :graph/restored, as :graph/restored is for window reloaded

+ 4 - 5
src/main/frontend/modules/outliner/ui.cljc

@@ -33,11 +33,10 @@
                  (let [request-id# (frontend.state/get-worker-next-request-id)
                        request# #(worker# :general/apply-outliner-ops
                                           (frontend.state/get-current-repo)
-                                          (logseq.db/write-transit-str r#)
-                                          (logseq.db/write-transit-str
-                                           (assoc ~opts
-                                                  :request-id request-id#
-                                                  :editor-info editor-info#)))
+                                          r#
+                                          (assoc ~opts
+                                                 :request-id request-id#
+                                                 :editor-info editor-info#))
                        response# (frontend.state/add-worker-request! request-id# request#)]
 
                    response#)))))))))

+ 8 - 12
src/main/frontend/persist_db/browser.cljs

@@ -37,7 +37,7 @@
                                  (not= (:config prev) (:config current))
                                  (assoc :config (:config current)))]
                  (when (seq new-state)
-                   (worker :general/sync-app-state (ldb/write-transit-str new-state)))))))
+                   (worker :general/sync-app-state new-state))))))
 
 (defn get-route-data
   [route-match]
@@ -60,14 +60,11 @@
                    (when (not= new-state old-state)
                      (worker :general/sync-ui-state
                              (state/get-current-repo)
-                             (ldb/write-transit-str {:old-state old-state
-                                                     :new-state new-state}))))))))
+                             {:old-state old-state :new-state new-state})))))))
 
 (defn transact!
   [worker repo tx-data tx-meta]
-  (let [tx-meta' (ldb/write-transit-str tx-meta)
-        tx-data' (ldb/write-transit-str tx-data)
-        ;; TODO: a better way to share those information with worker, maybe using the state watcher to notify the worker?
+  (let [;; TODO: a better way to share those information with worker, maybe using the state watcher to notify the worker?
         context {:dev? config/dev?
                  :node-test? util/node-test?
                  :validate-db-options (:dev/validate-db-options (state/get-config))
@@ -81,7 +78,7 @@
                  :whiteboards-directory (config/get-whiteboards-directory)
                  :pages-directory (config/get-pages-directory)}]
     (if worker
-      (worker :general/transact repo tx-data' tx-meta' (ldb/write-transit-str context))
+      (worker :general/transact repo tx-data tx-meta context)
       (notification/show! "Latest change was not saved! Please restart the application." :error))))
 
 (defn- with-write-transit-str
@@ -134,9 +131,8 @@
       (-> (p/let [_ (wrapped-worker :general/init config/RTC-WS-URL)
                   _ (js/console.debug (str "debug: init worker spent: " (- (util/time-ms) t1) "ms"))
                   _ (wrapped-worker :general/sync-app-state
-                                    (ldb/write-transit-str
-                                     {:git/current-repo (state/get-current-repo)
-                                      :config (:config @state/state)}))
+                                    {:git/current-repo (state/get-current-repo)
+                                     :config (:config @state/state)})
                   _ (sync-app-state! wrapped-worker)
                   _ (sync-ui-state! wrapped-worker)
                   _ (ask-persist-permission!)
@@ -178,7 +174,7 @@
   protocol/PersistentDB
   (<new [_this repo opts]
     (when-let [worker @*worker]
-      (worker :general/create-or-open-db repo (ldb/write-transit-str opts))))
+      (worker :general/create-or-open-db repo opts)))
 
   (<list-db [_this]
     (when-let [worker @*worker]
@@ -199,7 +195,7 @@
                   disk-db-data (when-not db-exists? (ipc/ipc :db-get repo))
                   _ (when disk-db-data
                       (worker :general/import-db repo disk-db-data))
-                  _ (worker :general/create-or-open-db repo (ldb/write-transit-str opts))]
+                  _ (worker :general/create-or-open-db repo opts)]
             (worker :general/get-initial-data repo))
           (p/catch sqlite-error-handler))))
 

+ 1 - 2
src/main/frontend/search.cljs

@@ -14,7 +14,6 @@
             [frontend.state :as state]
             [frontend.util :as util]
             [logseq.common.config :as common-config]
-            [logseq.db :as ldb]
             [promesa.core :as p]))
 
 (def fuzzy-search fuzzy/fuzzy-search)
@@ -127,7 +126,7 @@
                       (remove (fn [b] (= (:block/uuid b) (:block/uuid entity))))
                       (map (fn [b] [:block/uuid (:block/uuid b)])))
             result (when (seq eids)
-                     (@state/*db-worker :general/get-page-unlinked-refs repo (:db/id entity) (ldb/write-transit-str eids)))]
+                     (@state/*db-worker :general/get-page-unlinked-refs repo (:db/id entity) eids))]
       (when result (d/transact! (db/get-db repo false) result))
       (some->> result
                db-model/sort-by-order-recursive

+ 9 - 10
src/main/frontend/search/browser.cljs

@@ -1,7 +1,6 @@
 (ns frontend.search.browser
   "Browser implementation of search protocol"
-  (:require [cljs-bean.core :as bean]
-            [frontend.config :as config]
+  (:require [frontend.config :as config]
             [frontend.handler.file-based.property.util :as property-util]
             [frontend.persist-db.browser :as browser]
             [frontend.search.protocol :as protocol]
@@ -14,7 +13,7 @@
   protocol/Engine
   (query [_this q option]
     (if-let [worker @*worker]
-      (worker :search/search-blocks (state/get-current-repo) q (bean/->js option))
+      (worker :search/search-blocks (state/get-current-repo) q option)
       (p/resolved nil)))
   (rebuild-pages-indice! [_this]
     (if-let [worker @*worker]
@@ -27,12 +26,12 @@
               _ (protocol/truncate-blocks! this)
               result (worker :search/build-blocks-indice repo)
               blocks (if file-based?
-                       (->> (bean/->clj result)
+                       (->> result
                             ;; remove built-in properties from content
-                            (map #(update % :content
-                                          (fn [content]
-                                            (property-util/remove-built-in-properties (get % :format :markdown) content))))
-                            bean/->js)
+                            (map
+                             #(update % :content
+                                      (fn [content]
+                                        (property-util/remove-built-in-properties (get % :format :markdown) content)))))
                        result)
               _ (when (seq blocks)
                   (worker :search/upsert-blocks repo blocks))])
@@ -42,9 +41,9 @@
     (if-let [worker @*worker]
       (let [repo (state/get-current-repo)]
         (p/let [_ (when (seq blocks-to-remove-set)
-                    (worker :search/delete-blocks repo (bean/->js blocks-to-remove-set)))]
+                    (worker :search/delete-blocks repo blocks-to-remove-set))]
           (when (seq blocks-to-add)
-            (worker :search/upsert-blocks repo (bean/->js blocks-to-add)))))
+            (worker :search/upsert-blocks repo blocks-to-add))))
       (p/resolved nil)))
   (truncate-blocks! [_this]
     (if-let [worker @*worker]

+ 3 - 4
src/main/frontend/worker/db_listener.cljs

@@ -1,7 +1,6 @@
 (ns frontend.worker.db-listener
   "Db listeners for worker-db."
-  (:require [cljs-bean.core :as bean]
-            [datascript.core :as d]
+  (:require [datascript.core :as d]
             [frontend.common.thread-api :as thread-api]
             [frontend.worker.pipeline :as worker-pipeline]
             [frontend.worker.search :as search]
@@ -33,9 +32,9 @@
         (p/do!
          (let [{:keys [blocks-to-remove-set blocks-to-add]} (search/sync-search-indice repo tx-report')]
            (when (seq blocks-to-remove-set)
-             ((@thread-api/*thread-apis :search/delete-blocks) repo (bean/->js blocks-to-remove-set)))
+             ((@thread-api/*thread-apis :search/delete-blocks) repo blocks-to-remove-set))
            (when (seq blocks-to-add)
-             ((@thread-api/*thread-apis :search/upsert-blocks) repo (bean/->js blocks-to-add)))))))
+             ((@thread-api/*thread-apis :search/upsert-blocks) repo blocks-to-add))))))
     tx-report'))
 
 (comment

+ 28 - 51
src/main/frontend/worker/db_worker.cljs

@@ -452,8 +452,8 @@
   (init-sqlite-module!))
 
 (def-thread-api :general/create-or-open-db
-  [repo opts-str]
-  (let [{:keys [close-other-db?] :or {close-other-db? true} :as opts} (ldb/read-transit-str opts-str)]
+  [repo opts]
+  (let [{:keys [close-other-db?] :or {close-other-db? true} :as opts} opts]
     (p/do!
      (when close-other-db?
        (close-other-dbs! repo))
@@ -461,17 +461,14 @@
      nil)))
 
 (def-thread-api :general/q
-  [repo inputs-str]
+  [repo inputs]
   (when-let [conn (worker-state/get-datascript-conn repo)]
-    (let [inputs (ldb/read-transit-str inputs-str)]
-      (apply d/q (first inputs) @conn (rest inputs)))))
+    (apply d/q (first inputs) @conn (rest inputs))))
 
 (def-thread-api :general/pull
-  [repo selector-str id-str]
+  [repo selector id]
   (when-let [conn (worker-state/get-datascript-conn repo)]
-    (let [selector (ldb/read-transit-str selector-str)
-          id (ldb/read-transit-str id-str)
-          eid (if (and (vector? id) (= :block/name (first id)))
+    (let [eid (if (and (vector? id) (= :block/name (first id)))
                 (:db/id (ldb/get-page @conn (second id)))
                 id)]
       (some->> eid
@@ -482,7 +479,7 @@
   [repo id opts]
   (when-let [conn (worker-state/get-datascript-conn repo)]
     (let [id (if (and (string? id) (common-util/uuid-string? id)) (uuid id) id)]
-      (sqlite-common-db/get-block-and-children @conn id (ldb/read-transit-str opts)))))
+      (sqlite-common-db/get-block-and-children @conn id opts))))
 
 (def-thread-api :general/get-block-refs
   [repo id]
@@ -502,39 +499,26 @@
            (map (fn [b] (d/pull @conn '[*] (:db/id b))))))))
 
 (def-thread-api :general/get-page-unlinked-refs
-  [repo page-id search-result-eids-str]
+  [repo page-id search-result-eids]
   (when-let [conn (worker-state/get-datascript-conn repo)]
-    (let [search-result-eids (ldb/read-transit-str search-result-eids-str)]
-      (ldb/get-page-unlinked-refs @conn page-id search-result-eids))))
+    (ldb/get-page-unlinked-refs @conn page-id search-result-eids)))
 
 (def-thread-api :general/set-context
   [context]
-  (let [context (if (string? context)
-                  (ldb/read-transit-str context)
-                  context)]
-    (when context (worker-state/update-context! context))
-    nil))
+  (when context (worker-state/update-context! context))
+  nil)
 
 (def-thread-api :general/transact
   [repo tx-data tx-meta context]
   (when repo (worker-state/set-db-latest-tx-time! repo))
   (when-let [conn (worker-state/get-datascript-conn repo)]
     (try
-      (let [tx-data' (if (string? tx-data)
-                       (ldb/read-transit-str tx-data)
-                       tx-data)
-            tx-meta (if (string? tx-meta)
-                      (ldb/read-transit-str tx-meta)
-                      tx-meta)
-            tx-data' (if (contains? #{:insert-blocks} (:outliner-op tx-meta))
+      (let [tx-data' (if (contains? #{:insert-blocks} (:outliner-op tx-meta))
                        (map (fn [m]
                               (if (and (map? m) (nil? (:block/order m)))
                                 (assoc m :block/order (db-order/gen-key nil))
-                                m)) tx-data')
-                       tx-data')
-            context (if (string? context)
-                      (ldb/read-transit-str context)
-                      context)
+                                m)) tx-data)
+                       tx-data)
             _ (when context (worker-state/set-context! context))
             tx-meta' (cond-> tx-meta
                        (and (not (:whiteboard/transact? tx-meta))
@@ -555,11 +539,8 @@
         nil)
       (catch :default e
         (prn :debug :error)
-        (let [tx-data (if (string? tx-data)
-                        (ldb/read-transit-str tx-data)
-                        tx-data)]
-          (js/console.error e)
-          (prn :debug :tx-data @conn tx-data))))))
+        (js/console.error e)
+        (prn :debug :tx-data @conn tx-data)))))
 
 (def-thread-api :general/get-initial-data
   [repo]
@@ -615,12 +596,12 @@
   [repo q option]
   (p/let [search-db (get-search-db repo)
           conn (worker-state/get-datascript-conn repo)]
-    (search/search-blocks repo conn search-db q (bean/->clj option))))
+    (search/search-blocks repo conn search-db q option)))
 
 (def-thread-api :search/upsert-blocks
   [repo blocks]
   (p/let [db (get-search-db repo)]
-    (search/upsert-blocks! db blocks)
+    (search/upsert-blocks! db (bean/->js blocks))
     nil))
 
 (def-thread-api :search/delete-blocks
@@ -645,14 +626,12 @@
   nil)
 
 (def-thread-api :general/apply-outliner-ops
-  [repo ops-str opts-str]
+  [repo ops opts]
   (when-let [conn (worker-state/get-datascript-conn repo)]
     (try
       (worker-util/profile
        "apply outliner ops"
-       (let [ops (ldb/read-transit-str ops-str)
-             opts (ldb/read-transit-str opts-str)]
-         (outliner-op/apply-ops! repo conn ops (worker-state/get-date-formatter repo) opts)))
+       (outliner-op/apply-ops! repo conn ops (worker-state/get-date-formatter repo) opts))
       (catch :default e
         (let [data (ex-data e)
               {:keys [type payload]} (when (map? data) data)]
@@ -683,14 +662,13 @@
   nil)
 
 (def-thread-api :general/sync-app-state
-  [new-state-str]
-  (let [new-state (ldb/read-transit-str new-state-str)]
-    (worker-state/set-new-state! new-state)
-    nil))
+  [new-state]
+  (worker-state/set-new-state! new-state)
+  nil)
 
 (def-thread-api :general/sync-ui-state
-  [repo state-str]
-  (undo-redo/record-ui-state! repo state-str)
+  [repo state]
+  (undo-redo/record-ui-state! repo (ldb/write-transit-str state))
   nil)
 
 (def-thread-api :export/get-debug-datoms
@@ -720,8 +698,8 @@
     (undo-redo/redo repo conn)))
 
 (def-thread-api :undo-redo/record-editor-info
-  [repo _page-block-uuid-str editor-info-str]
-  (undo-redo/record-editor-info! repo (ldb/read-transit-str editor-info-str))
+  [repo _page-block-uuid-str editor-info]
+  (undo-redo/record-editor-info! repo editor-info)
   nil)
 
 (def-thread-api :general/validate-db
@@ -735,8 +713,7 @@
   [repo options]
   (let [conn (worker-state/get-datascript-conn repo)]
     (try
-      (->> (ldb/read-transit-str options)
-           (sqlite-export/build-export @conn))
+      (sqlite-export/build-export @conn options)
       (catch :default e
         (js/console.error "export-edn error: " e)
         (worker-util/post-message :notification

+ 4 - 5
src/main/frontend/worker/device.cljs

@@ -173,9 +173,8 @@
         (m/? (new-task--remove-user-device* get-ws-create-task device-uuid*))))))
 
 (defn new-task--sync-current-graph-encrypted-aes-key
-  [token device-uuids-transit-str]
-  (let [repo (worker-state/get-current-repo)
-        device-uuids (ldb/read-transit-str device-uuids-transit-str)]
+  [token device-uuids]
+  (let [repo (worker-state/get-current-repo)]
     (assert (and (seq device-uuids) (every? uuid? device-uuids)) device-uuids)
     (m/sp
       (when-let [graph-uuid (client-op/get-graph-uuid repo)]
@@ -209,8 +208,8 @@
                       get-ws-create-task device-uuid->encrypted-aes-key graph-uuid))))))))))
 
 (def-thread-api :rtc/sync-current-graph-encrypted-aes-key
-  [token device-uuids-transit-str]
-  (new-task--sync-current-graph-encrypted-aes-key token device-uuids-transit-str))
+  [token device-uuids]
+  (new-task--sync-current-graph-encrypted-aes-key token device-uuids))
 
 (def-thread-api :device/list-devices
   [token]

+ 4 - 6
src/main/frontend/worker/rtc/core.cljs

@@ -548,12 +548,10 @@
   (rtc-toggle-remote-profile))
 
 (def-thread-api :rtc/grant-graph-access
-  [token graph-uuid target-user-uuids-str target-user-emails-str]
-  (let [target-user-uuids (ldb/read-transit-str target-user-uuids-str)
-        target-user-emails (ldb/read-transit-str target-user-emails-str)]
-    (new-task--grant-access-to-others token graph-uuid
-                                      :target-user-uuids target-user-uuids
-                                      :target-user-emails target-user-emails)))
+  [token graph-uuid target-user-uuids target-user-emails]
+  (new-task--grant-access-to-others token graph-uuid
+                                    :target-user-uuids target-user-uuids
+                                    :target-user-emails target-user-emails))
 
 (def-thread-api :rtc/get-graphs
   [token]

+ 1 - 1
src/main/frontend/worker/rtc/full_upload_download_graph.cljs

@@ -357,7 +357,7 @@
         (create-graph-for-rtc-test repo init-tx-data tx-data)
         (c.m/<?
          (p/do!
-          ((@thread-api/*thread-apis :general/create-or-open-db) repo (ldb/write-transit-str {:close-other-db? false}))
+          ((@thread-api/*thread-apis :general/create-or-open-db) repo {:close-other-db? false})
           ((@thread-api/*thread-apis :general/export-db) repo)
           ((@thread-api/*thread-apis :general/transact)
            repo init-tx-data

+ 1 - 2
src/main/frontend/worker/search.cljs

@@ -346,8 +346,7 @@ DROP TRIGGER IF EXISTS blocks_au;
   [repo db]
   (build-fuzzy-search-indice repo db)
   (->> (get-all-blocks db)
-       (keep block->index)
-       (bean/->js)))
+       (keep block->index)))
 
 (defn- get-blocks-from-datoms-impl
   [repo {:keys [db-after db-before]} datoms]