From 195f0cfa407ad023969f3a6859b06c4051e1f038 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Wed, 6 Dec 2023 10:49:50 +0100 Subject: [PATCH] Mark mnemonic as shown on revealing it to the user --- src/status_im/ui/screens/profile/seed/views.cljs | 3 ++- src/status_im2/contexts/profile/settings/events.cljs | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/status_im/ui/screens/profile/seed/views.cljs b/src/status_im/ui/screens/profile/seed/views.cljs index 736aaf7fc0..5ac136bbc1 100644 --- a/src/status_im/ui/screens/profile/seed/views.cljs +++ b/src/status_im/ui/screens/profile/seed/views.cljs @@ -46,7 +46,8 @@ :key :your-data-belongs-to-you-description}] [react/view {:style styles/intro-button} [quo/button - {:on-press #(re-frame/dispatch [:set-in [:my-profile/seed :step] :12-words])} + {:on-press #(do (re-frame/dispatch [:set-in [:my-profile/seed :step] :12-words]) + (re-frame/dispatch [:profile.settings/mnemonic-was-shown]))} (i18n/label :t/ok-continue)]]]) (defn six-words diff --git a/src/status_im2/contexts/profile/settings/events.cljs b/src/status_im2/contexts/profile/settings/events.cljs index eaa5f02e20..b00da56972 100644 --- a/src/status_im2/contexts/profile/settings/events.cljs +++ b/src/status_im2/contexts/profile/settings/events.cljs @@ -138,3 +138,10 @@ {:events [:profile.settings/update-local-picture]} [cofx pics] (optimistic-profile-update cofx :images pics)) + +(rf/defn mark-mnemonic-as-shown + {:events [:profile.settings/mnemonic-was-shown]} + [cofx] + {:json-rpc/call [{:method "settings_mnemonicWasShown" + :on-success #(log/debug "mnemonic was marked as shown") + :on-error #(log/error "mnemonic was not marked as shown" %)}]})