Compare commits

...
Author SHA1 Message Date
Ulises M 56962fde77 WIP 2 2025-01-30 10:16:29 -06:00
Ulises M 248bd853a8 WIP: Testing alias from status-go 2025-01-29 21:17:14 -06:00
4 changed files with 22 additions and 8 deletions
+5 -5
View File
@@ -24,11 +24,11 @@
(defn- reduce-profiles
[profiles]
(reduce
(fn [acc {:keys [key-uid] :as profile}]
(assoc acc key-uid (profile.rpc/rpc->profiles-overview profile)))
{}
profiles))
(reduce (fn [acc {:keys [key-uid] :as profile}]
(def --x profile)
(assoc acc key-uid (profile.rpc/rpc->profiles-overview profile)))
{}
profiles))
(rf/reg-fx
:profile/get-profiles-overview
@@ -40,11 +40,15 @@
;; login phase 1: we want to load and show chats faster, so we split login into 2 phases
(rf/reg-event-fx :profile.login/login-existing-profile
(fn [{:keys [db]} [settings-data account]]
(let [settings (data-store.settings/rpc->settings settings-data)
(let [_ (def --sd settings-data)
settings (data-store.settings/rpc->settings settings-data)
_ (def --s settings)
profile-overview (profile.rpc/rpc->profiles-overview account)
_ (def --xx profile-overview)
log-level (or (:log-level settings) config/log-level)
pairing-completed? (= (get-in db [:syncing :pairing-status]) :completed)
biometric-supported-type (get-in db [:biometrics :supported-type])
_ (def --db db)
new-db (-> db
(assoc :profile/profile
(merge profile-overview
@@ -52,7 +56,13 @@
{:log-level log-level}))
(assoc-in [:activity-center :loading?] true)
(dissoc :centralized-metrics/onboarding-enabled?))
_ (def --ndb new-db)
keycard? (get-in new-db [:profile/profile :keycard-pairing])]
(comment
(:compressed-key (:profile/profile --ndb))
(keys --s)
)
{:db (cond-> new-db
pairing-completed? (dissoc :syncing))
:fx (into [[:json-rpc/call
+5 -1
View File
@@ -16,5 +16,9 @@
(dissoc :customizationColor)
(assoc :customization-color (keyword customizationColor))
(assoc :ens-name? (utils.ens/is-valid-eth-name? (:name profile)))
(assoc :keycard-pairing (when-not (string/blank? keycard-pairing) keycard-pairing)))
(assoc :keycard-pairing (when-not (string/blank? keycard-pairing) keycard-pairing))
(update :name #(if (empty? %)
(:name profile)
;(:alias profile)
(:name profile))))
profile))
@@ -6,7 +6,7 @@
{:server-enabled? (config/enabled? config/STATUS_BACKEND_SERVER_ENABLED)
:status-go-endpoint (str "http://" config/STATUS_BACKEND_SERVER_HOST "/statusgo/")
:signal-endpoint (str "ws://" config/STATUS_BACKEND_SERVER_HOST "/signals")
:root-data-dir config/STATUS_BACKEND_SERVER_ROOT_DATA_DIR})
:root-data-dir "/home/ulises/p/status-backend-data-dir/"})
(defn set-config!
[{:keys [server-enabled? status-go-endpoint signal-endpoint root-data-dir]}]