Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet: Set color and emoji #17906

Merged
merged 12 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
qa
  • Loading branch information
OmarBasem committed Dec 6, 2023
commit cb83046c1aa2cb8fd3060469558adb96b447736f
4 changes: 4 additions & 0 deletions src/status_im2/contexts/profile/create/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@

(rf/defn create-profile-and-login
{:events [:profile.create/create-and-login]}
<<<<<<< HEAD
<<<<<<< HEAD
[_ {:keys [display-name password image-path color]}]
{:effects.profile/create-and-login
=======
[_ {:keys [display-name password image-path color emoji]}]
OmarBasem marked this conversation as resolved.
Show resolved Hide resolved
=======
[_ {:keys [display-name password image-path color]}]
>>>>>>> d46724bcf (qa)
{::create-profile-and-login
>>>>>>> c1d06ad1d (wallet: add color and emoji)
(assoc (profile.config/create)
Expand Down
21 changes: 21 additions & 0 deletions src/status_im2/contexts/profile/recover/events.cljs
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
(ns status-im2.contexts.profile.recover.events
(:require
[native-module.core :as native-module]
<<<<<<< HEAD
=======
[re-frame.core :as re-frame]
[status-im2.contexts.emoji-picker.utils :as emoji-picker.utils]
>>>>>>> d46724bcf (qa)
[status-im2.contexts.profile.config :as profile.config]
status-im2.contexts.profile.recover.effects
[utils.re-frame :as rf]
[utils.security.core :as security]))

(rf/defn recover-profile-and-login
<<<<<<< HEAD
{:events [:profile.recover/recover-and-login]}
[{:keys [db]} {:keys [display-name password image-path color seed-phrase]}]
{:db
Expand All @@ -19,3 +25,18 @@
:password (native-module/sha3 (security/safe-unmask-data password))
:imagePath (profile.config/strip-file-prefix image-path)
:customizationColor color})})
=======
{:events [:profile.recover/recover-and-login]}
[{:keys [db]} {:keys [display-name password image-path color seed-phrase]}]
{:db
(assoc db :onboarding-2/recovered-account? true)

::restore-profile-and-login
(merge (profile.config/create)
{:displayName display-name
:mnemonic (security/safe-unmask-data seed-phrase)
:password (native-module/sha3 (security/safe-unmask-data password))
:imagePath (profile.config/strip-file-prefix image-path)
:customizationColor color
:emoji (emoji-picker.utils/random-emoji)})})
>>>>>>> d46724bcf (qa)