-
Notifications
You must be signed in to change notification settings - Fork 985
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
374 additions
and
471 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,19 @@ | ||
(ns status-im2.contexts.profile.create.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] | ||
>>>>>>> 3e7d48f12 (review) | ||
[status-im2.contexts.profile.config :as profile.config] | ||
status-im2.contexts.profile.create.effects | ||
[utils.re-frame :as rf] | ||
[utils.security.core :as security])) | ||
|
||
(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]}] | ||
======= | ||
[_ {:keys [display-name password image-path color]}] | ||
>>>>>>> d46724bcf (qa) | ||
{::create-profile-and-login | ||
>>>>>>> c1d06ad1d (wallet: add color and emoji) | ||
(assoc (profile.config/create) | ||
:displayName display-name | ||
: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))}) | ||
{:events [:profile.create/create-and-login]} | ||
[_ {:keys [display-name password image-path color]}] | ||
{:effects.profile/create-and-login | ||
(assoc (profile.config/create) | ||
:displayName display-name | ||
: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))}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,23 @@ | ||
(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 | ||
(assoc db :onboarding/recovered-account? true) | ||
|
||
:effects.profile/restore-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})}) | ||
======= | ||
{: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) | ||
(assoc db :onboarding/recovered-account? true) | ||
|
||
::restore-profile-and-login | ||
:effects.profile/restore-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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.