File tree 2 files changed +14
-0
lines changed
status_im2/contexts/profile
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 145
145
(js->clj event-js :keywordize-keys true ))
146
146
" curated.communities.update" (rf/dispatch [:fetched-contract-communities
147
147
(js->clj event-js :keywordize-keys true )])
148
+ " waku.backedup.profile" (rf/dispatch [:profile/update-profile-from-backup
149
+ (js->clj event-js :keywordize-keys true )])
150
+ " waku.backedup.settings" (rf/dispatch [:profile/update-setting-from-backup
151
+ (js->clj event-js :keywordize-keys true )])
148
152
149
153
(log/debug " Event " type " not handled" ))))
Original file line number Diff line number Diff line change 47
47
; ;if succeed "node.login" signal will be triggered
48
48
(login/login-with-biometric-if-available key-uid)))
49
49
(navigation/init-root cofx :intro )))
50
+
51
+ (rf/defn update-setting-from-backup
52
+ {:events [:profile/update-setting-from-backup ]}
53
+ [{:keys [db]} {{:keys [name value]} :backedUpSettings }]
54
+ {:db (assoc-in db [:profile/profile (keyword name)] value)})
55
+
56
+ (rf/defn update-profile-from-backup
57
+ {:events [:profile/update-profile-from-backup ]}
58
+ [_ {{:keys [ensUsernameDetails]} :backedUpProfile }]
59
+ {:dispatch [:ens/update-usernames ensUsernameDetails]})
You can’t perform that action at this time.
0 commit comments