Skip to content

Commit

Permalink
chore(wallet): move add-account funcitonality into its own folder
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Son89 committed Apr 2, 2024
1 parent 68e4cf3 commit 6a51448
Show file tree
Hide file tree
Showing 30 changed files with 62 additions and 58 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns status-im.contexts.wallet.add-address-to-watch.component-spec
(ns status-im.contexts.wallet.add-account.add-address-to-watch.component-spec
(:require
[status-im.contexts.wallet.add-address-to-watch.view :as add-address-to-watch]
[status-im.contexts.wallet.add-account.add-address-to-watch.view :as add-address-to-watch]
status-im.contexts.wallet.events
[test-helpers.component :as h]))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns status-im.contexts.wallet.add-address-to-watch.confirm-address.component-spec
(ns status-im.contexts.wallet.add-account.add-address-to-watch.confirm-address.component-spec
(:require
[status-im.contexts.wallet.add-address-to-watch.confirm-address.view :as confirm-address]
[status-im.contexts.wallet.add-account.add-address-to-watch.confirm-address.view :as confirm-address]
[test-helpers.component :as h]))

(h/describe "Add Watch Only Account Page"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.wallet.add-address-to-watch.confirm-address.style)
(ns status-im.contexts.wallet.add-account.add-address-to-watch.confirm-address.style)

(def container
{:flex 1})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
(ns status-im.contexts.wallet.add-address-to-watch.confirm-address.view
(ns status-im.contexts.wallet.add-account.add-address-to-watch.confirm-address.view
(:require
[clojure.string :as string]
[quo.core :as quo]
[quo.foundations.colors :as colors]
[react-native.core :as rn]
[reagent.core :as reagent]
[status-im.common.emoji-picker.utils :as emoji-picker.utils]
[status-im.contexts.wallet.add-address-to-watch.confirm-address.style :as style]
[status-im.contexts.wallet.add-account.add-address-to-watch.confirm-address.style :as style]
[status-im.contexts.wallet.common.screen-base.create-or-edit-account.view :as
create-or-edit-account]
[utils.i18n :as i18n]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.wallet.accounts.add-account.address-to-watch.events
(ns status-im.contexts.wallet.add-account.add-address-to-watch.events
(:require [clojure.string :as string]
[status-im.constants :as constants]
[taoensso.timbre :as log]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.wallet.add-address-to-watch.style)
(ns status-im.contexts.wallet.add-account.add-address-to-watch.style)

(def header-container {:padding-bottom 8})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.wallet.add-address-to-watch.view
(ns status-im.contexts.wallet.add-account.add-address-to-watch.view
(:require
[clojure.string :as string]
[quo.core :as quo]
Expand All @@ -7,7 +7,7 @@
[reagent.core :as reagent]
[status-im.common.floating-button-page.view :as floating-button-page]
[status-im.constants :as constants]
[status-im.contexts.wallet.add-address-to-watch.style :as style]
[status-im.contexts.wallet.add-account.add-address-to-watch.style :as style]
[status-im.contexts.wallet.common.validation :as validation]
[status-im.subs.wallet.add-account.address-to-watch]
[utils.debounce :as debounce]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(ns status-im.contexts.wallet.create-account.edit-derivation-path.component-spec
(ns status-im.contexts.wallet.add-account.create-account.edit-derivation-path.component-spec
(:require
[status-im.contexts.wallet.create-account.edit-derivation-path.view :as edit-derivation-path]
[status-im.contexts.wallet.add-account.create-account.edit-derivation-path.view :as
edit-derivation-path]
[test-helpers.component :as h]))

(def sub-mocks
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.wallet.create-account.edit-derivation-path.path-format-sheet.view
(ns status-im.contexts.wallet.add-account.create-account.edit-derivation-path.path-format-sheet.view
(:require
[quo.core :as quo]
[status-im.constants :as constants]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.wallet.create-account.edit-derivation-path.style
(ns status-im.contexts.wallet.add-account.create-account.edit-derivation-path.style
(:require [quo.foundations.colors :as colors]))

(defn screen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
(ns status-im.contexts.wallet.create-account.edit-derivation-path.view
(ns status-im.contexts.wallet.add-account.create-account.edit-derivation-path.view
(:require
[quo.core :as quo]
[quo.foundations.colors :as colors]
[quo.theme :as quo.theme]
[react-native.core :as rn]
[react-native.safe-area :as safe-area]
[reagent.core :as reagent]
[status-im.contexts.wallet.add-account.create-account.edit-derivation-path.path-format-sheet.view :as
path-format-sheet]
[status-im.contexts.wallet.add-account.create-account.edit-derivation-path.style :as style]
[status-im.contexts.wallet.common.temp :as temp]
[status-im.contexts.wallet.common.utils :as utils]
[status-im.contexts.wallet.create-account.edit-derivation-path.path-format-sheet.view :as
path-format-sheet]
[status-im.contexts.wallet.create-account.edit-derivation-path.style :as style]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.wallet.create-account.events
(ns status-im.contexts.wallet.add-account.create-account.events
(:require [status-im.contexts.wallet.data-store :as data-store]
[utils.re-frame :as rf]))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
(ns status-im.contexts.wallet.create-account.events-test
(ns status-im.contexts.wallet.add-account.create-account.events-test
(:require
[cljs.test :refer-macros [deftest is]]
matcher-combinators.test
[status-im.contexts.wallet.create-account.events :as events]))
[status-im.contexts.wallet.add-account.create-account.events :as events]))

(deftest confirm-account-origin
(let [db {:wallet {:ui {:create-account {}}}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.wallet.create-account.new-keypair.backup-recovery-phrase.style
(ns status-im.contexts.wallet.add-account.create-account.new-keypair.backup-recovery-phrase.style
(:require
[quo.foundations.colors :as colors]
[quo.theme :as quo.theme]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.wallet.create-account.new-keypair.backup-recovery-phrase.view
(ns status-im.contexts.wallet.add-account.create-account.new-keypair.backup-recovery-phrase.view
(:require
[clojure.string :as string]
[native-module.core :as native-module]
Expand All @@ -7,7 +7,8 @@
[react-native.blur :as blur]
[react-native.core :as rn]
[reagent.core :as reagent]
[status-im.contexts.wallet.create-account.new-keypair.backup-recovery-phrase.style :as style]
[status-im.contexts.wallet.add-account.create-account.new-keypair.backup-recovery-phrase.style :as
style]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.wallet.create-account.new-keypair.check-your-backup.style)
(ns status-im.contexts.wallet.add-account.create-account.new-keypair.check-your-backup.style)

(def header-container
{:margin-horizontal 20
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
(ns status-im.contexts.wallet.create-account.new-keypair.check-your-backup.view
(ns status-im.contexts.wallet.add-account.create-account.new-keypair.check-your-backup.view
(:require
[quo.core :as quo]
[quo.theme :as quo.theme]
[react-native.core :as rn]
[reagent.core :as reagent]
[status-im.contexts.wallet.create-account.new-keypair.check-your-backup.style :as style]
[status-im.contexts.wallet.add-account.create-account.new-keypair.check-your-backup.style :as style]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.wallet.create-account.new-keypair.keypair-name.style)
(ns status-im.contexts.wallet.add-account.create-account.new-keypair.keypair-name.style)

(def header-container
{:margin-horizontal 20
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
(ns status-im.contexts.wallet.create-account.new-keypair.keypair-name.view
(ns status-im.contexts.wallet.add-account.create-account.new-keypair.keypair-name.view
(:require
[quo.core :as quo]
[react-native.core :as rn]
[reagent.core :as reagent]
[status-im.common.floating-button-page.view :as floating-button-page]
[status-im.contexts.wallet.create-account.new-keypair.keypair-name.style :as style]
[status-im.contexts.wallet.add-account.create-account.new-keypair.keypair-name.style :as style]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.wallet.create-account.select-keypair.style)
(ns status-im.contexts.wallet.add-account.create-account.select-keypair.style)

(def header-container
{:margin-bottom 8})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
(ns status-im.contexts.wallet.create-account.select-keypair.view
(ns status-im.contexts.wallet.add-account.create-account.select-keypair.view
(:require
[clojure.string :as string]
[quo.core :as quo]
[react-native.core :as rn]
[status-im.constants :as constants]
[status-im.contexts.wallet.create-account.select-keypair.style :as style]
[status-im.contexts.wallet.add-account.create-account.select-keypair.style :as style]
[utils.address :as utils]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.wallet.create-account.style
(ns status-im.contexts.wallet.add-account.create-account.style
(:require
[quo.foundations.colors :as colors]))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.wallet.create-account.utils)
(ns status-im.contexts.wallet.add-account.create-account.utils)

(defn prepare-new-keypair
[{:keys [new-keypair address account-name account-color emoji derivation-path]}]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.wallet.create-account.view
(ns status-im.contexts.wallet.add-account.create-account.view
(:require
[clojure.string :as string]
[quo.core :as quo]
Expand All @@ -11,9 +11,9 @@
[status-im.common.floating-button-page.view :as floating-button-page]
[status-im.common.standard-authentication.core :as standard-auth]
[status-im.constants :as constants]
[status-im.contexts.wallet.add-account.create-account.style :as style]
[status-im.contexts.wallet.add-account.create-account.utils :as create-account.utils]
[status-im.contexts.wallet.common.utils :as utils]
[status-im.contexts.wallet.create-account.style :as style]
[status-im.contexts.wallet.create-account.utils :as create-account.utils]
[status-im.contexts.wallet.sheets.account-origin.view :as account-origin]
[utils.i18n :as i18n]
[utils.re-frame :as rf]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.wallet.events.collectibles
(ns status-im.contexts.wallet.collectible.events
(:require [camel-snake-kebab.extras :as cske]
[taoensso.timbre :as log]
[utils.ethereum.chain :as chain]
Expand Down
3 changes: 1 addition & 2 deletions src/status_im/contexts/wallet/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
[clojure.string :as string]
[react-native.background-timer :as background-timer]
[react-native.platform :as platform]
[status-im.contexts.wallet.accounts.add-account.address-to-watch.events]
[status-im.contexts.wallet.collectible.events]
[status-im.contexts.wallet.common.utils :as utils]
[status-im.contexts.wallet.data-store :as data-store]
[status-im.contexts.wallet.events.collectibles]
[status-im.contexts.wallet.item-types :as item-types]
[taoensso.timbre :as log]
[utils.collection]
Expand Down
4 changes: 2 additions & 2 deletions src/status_im/contexts/wallet/events_test.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
(:require
[cljs.test :refer-macros [deftest is testing]]
matcher-combinators.test
[status-im.contexts.wallet.events :as events]
[status-im.contexts.wallet.events.collectibles :as collectibles]))
[status-im.contexts.wallet.collectible.events :as collectibles]
[status-im.contexts.wallet.events :as events]))

(def address "0x2f88d65f3cb52605a54a833ae118fb1363acccd2")

Expand Down
6 changes: 3 additions & 3 deletions src/status_im/core_spec.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[status-im.contexts.chat.messenger.messages.content.audio.component-spec]
[status-im.contexts.communities.actions.community-options.component-spec]
[status-im.contexts.shell.share.wallet.component-spec]
[status-im.contexts.wallet.add-address-to-watch.component-spec]
[status-im.contexts.wallet.add-address-to-watch.confirm-address.component-spec]
[status-im.contexts.wallet.create-account.edit-derivation-path.component-spec]
[status-im.contexts.wallet.add-account.create-account.edit-derivation-path.component-spec]
[status-im.contexts.wallet.add-account.add-address-to-watch.component-spec]
[status-im.contexts.wallet.add-account.add-address-to-watch.confirm-address.component-spec]
[status-im.contexts.wallet.send.input-amount.component-spec]))
3 changes: 2 additions & 1 deletion src/status_im/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
status-im.contexts.profile.settings.events
status-im.contexts.shell.share.events
status-im.contexts.syncing.events
status-im.contexts.wallet.add-account.add-address-to-watch.events
status-im.contexts.wallet.add-account.create-account.events
status-im.contexts.wallet.common.wizard
status-im.contexts.wallet.create-account.events
status-im.contexts.wallet.effects
status-im.contexts.wallet.events
status-im.contexts.wallet.send.events
Expand Down
22 changes: 12 additions & 10 deletions src/status_im/navigation/screens.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,24 @@
[status-im.contexts.wallet.account.edit-account.view :as wallet-edit-account]
[status-im.contexts.wallet.account.share-address.view :as wallet-share-address]
[status-im.contexts.wallet.account.view :as wallet-accounts]
[status-im.contexts.wallet.add-address-to-watch.confirm-address.view :as
[status-im.contexts.wallet.add-account.create-account.edit-derivation-path.view :as
wallet-edit-derivation-path]
[status-im.contexts.wallet.add-account.create-account.new-keypair.backup-recovery-phrase.view :as
wallet-backup-recovery-phrase]
[status-im.contexts.wallet.add-account.create-account.new-keypair.check-your-backup.view :as
wallet-check-your-backup]
[status-im.contexts.wallet.add-account.create-account.new-keypair.keypair-name.view :as
wallet-keypair-name]
[status-im.contexts.wallet.add-account.create-account.select-keypair.view :as wallet-select-keypair]
[status-im.contexts.wallet.add-account.create-account.view :as wallet-create-account]
[status-im.contexts.wallet.add-account.add-address-to-watch.confirm-address.view :as
wallet-confirm-address-to-watch]
[status-im.contexts.wallet.add-address-to-watch.view :as wallet-add-address-to-watch]
[status-im.contexts.wallet.add-account.add-address-to-watch.view :as wallet-add-address-to-watch]
[status-im.contexts.wallet.bridge.bridge-to.view :as wallet-bridge-to]
[status-im.contexts.wallet.bridge.input-amount.view :as wallet-bridge-input-amount]
[status-im.contexts.wallet.bridge.select-asset.view :as wallet-bridge-select-asset]
[status-im.contexts.wallet.collectible.view :as wallet-collectible]
[status-im.contexts.wallet.common.scan-account.view :as wallet-scan-address]
[status-im.contexts.wallet.create-account.edit-derivation-path.view :as wallet-edit-derivation-path]
[status-im.contexts.wallet.create-account.new-keypair.backup-recovery-phrase.view :as
wallet-backup-recovery-phrase]
[status-im.contexts.wallet.create-account.new-keypair.check-your-backup.view :as
wallet-check-your-backup]
[status-im.contexts.wallet.create-account.new-keypair.keypair-name.view :as wallet-keypair-name]
[status-im.contexts.wallet.create-account.select-keypair.view :as wallet-select-keypair]
[status-im.contexts.wallet.create-account.view :as wallet-create-account]
[status-im.contexts.wallet.send.save-address.view :as wallet-save-address]
[status-im.contexts.wallet.send.select-address.view :as wallet-select-address]
[status-im.contexts.wallet.send.select-asset.view :as wallet-select-asset]
Expand Down

0 comments on commit 6a51448

Please sign in to comment.