Mark mnemonic as shown on revealing it to the user

This commit is contained in:
Roman Volosovskyi 2023-12-06 10:49:50 +01:00
parent ab61d8d5c0
commit 195f0cfa40
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
2 changed files with 9 additions and 1 deletions

View File

@ -46,7 +46,8 @@
:key :your-data-belongs-to-you-description}] :key :your-data-belongs-to-you-description}]
[react/view {:style styles/intro-button} [react/view {:style styles/intro-button}
[quo/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)]]]) (i18n/label :t/ok-continue)]]])
(defn six-words (defn six-words

View File

@ -138,3 +138,10 @@
{:events [:profile.settings/update-local-picture]} {:events [:profile.settings/update-local-picture]}
[cofx pics] [cofx pics]
(optimistic-profile-update cofx :images 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" %)}]})