Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarBasem committed Dec 5, 2023
1 parent 1e4c9b4 commit c624805
Show file tree
Hide file tree
Showing 6 changed files with 374 additions and 471 deletions.
31 changes: 9 additions & 22 deletions src/status_im2/contexts/profile/create/events.cljs
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))})
23 changes: 2 additions & 21 deletions src/status_im2/contexts/profile/recover/events.cljs
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)
30 changes: 2 additions & 28 deletions src/status_im2/contexts/wallet/account/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -28,41 +28,15 @@
(cond-> [{:id :assets :label (i18n/label :t/assets) :accessibility-label :assets-tab}
{:id :collectibles :label (i18n/label :t/collectibles) :accessibility-label :collectibles-tab}
{:id :activity :label (i18n/label :t/activity) :accessibility-label :activity-tab}]
(not watch-only?) (conj {:id :dapps :label (i18n/label :t/dapps) :accessibility-label :dapps})
true (conj {:id :about :label (i18n/label :t/about) :accessibility-label :about})))
(not watch-only?) (conj {:id :dapps :label (i18n/label :t/dapps) :accessibility-label :dapps})
true (conj {:id :about :label (i18n/label :t/about) :accessibility-label :about})))

(defn view
[]
(let [selected-tab (reagent/atom first-tab-id)]
(fn []
<<<<<<< HEAD
<<<<<<< HEAD
(let [{:keys [name color balance type]} (rf/sub [:wallet/current-viewing-account])
watch-only? (= type :watch)]
=======
<<<<<<< HEAD
(let [{:keys [name color balance]} (rf/sub [:wallet/current-viewing-account])
]
=======
(let [{:keys [name color emoji balance]} (rf/sub [:wallet/current-viewing-account])
<<<<<<< HEAD
networks (rf/sub [:wallet/network-details])
profile1 (rf/sub [:profile/wallet-accounts])
profile2 (rf/sub [:wallet/accounts])]
;(println "profile1: " profile1)
;(println "profile2: " profile2)
>>>>>>> 8bcb90b41 (wallet: add color and emoji)
<<<<<<< HEAD
>>>>>>> c1d06ad1d (wallet: add color and emoji)
=======
=======
networks (rf/sub [:wallet/network-details])]
>>>>>>> aa35edaf6 (lint)
>>>>>>> 9c3ec27ba (lint)
=======
(let [{:keys [name color balance]} (rf/sub [:wallet/current-viewing-account])
]
>>>>>>> 0ae3804f1 (rebase)
[rn/view {:style {:flex 1}}
[account-switcher/view {:on-press #(rf/dispatch [:wallet/close-account-page])}]
[quo/account-overview
Expand Down
Loading

0 comments on commit c624805

Please sign in to comment.