rename subaccounts -> accounts
This commit is contained in:
parent
3597978131
commit
ab58dcfa36
|
@ -142,7 +142,7 @@
|
||||||
assoc :processing? false
|
assoc :processing? false
|
||||||
:step (inc-step step))})))
|
:step (inc-step step))})))
|
||||||
|
|
||||||
(defn prepare-subaccounts-data
|
(defn prepare-accounts-data
|
||||||
[multiaccount]
|
[multiaccount]
|
||||||
[(let [{:keys [publicKey address]}
|
[(let [{:keys [publicKey address]}
|
||||||
(get-in multiaccount [:derived constants/path-default-wallet-keyword])]
|
(get-in multiaccount [:derived constants/path-default-wallet-keyword])]
|
||||||
|
@ -164,10 +164,10 @@
|
||||||
{:keys [address publicKey keycard-instance-uid keycard-key-uid keycard-pairing keycard-paired-on mnemonic] :as multiaccount}
|
{:keys [address publicKey keycard-instance-uid keycard-key-uid keycard-pairing keycard-paired-on mnemonic] :as multiaccount}
|
||||||
password
|
password
|
||||||
{:keys [seed-backed-up? login?] :or {login? true}}]
|
{:keys [seed-backed-up? login?] :or {login? true}}]
|
||||||
(let [[wallet-account {:keys [publicKey]} :as subaccounts-data] (prepare-subaccounts-data multiaccount)
|
(let [[wallet-account {:keys [publicKey]} :as accounts-data] (prepare-accounts-data multiaccount)
|
||||||
name (gfycat/generate-gfy publicKey)
|
name (gfycat/generate-gfy publicKey)
|
||||||
photo-path (identicon/identicon publicKey)
|
photo-path (identicon/identicon publicKey)
|
||||||
account-data {:name name :address address :photo-path photo-path}
|
multiaccount-data {:name name :address address :photo-path photo-path}
|
||||||
new-multiaccount {:address address
|
new-multiaccount {:address address
|
||||||
:name name
|
:name name
|
||||||
:photo-path photo-path
|
:photo-path photo-path
|
||||||
|
@ -194,10 +194,10 @@
|
||||||
{:db (cond-> db
|
{:db (cond-> db
|
||||||
seed-backed-up?
|
seed-backed-up?
|
||||||
(assoc-in [:multiaccount :seed-backed-up?] true))
|
(assoc-in [:multiaccount :seed-backed-up?] true))
|
||||||
::save-account-and-login [(types/clj->json account-data)
|
::save-account-and-login [(types/clj->json multiaccount-data)
|
||||||
password
|
password
|
||||||
(node/get-new-config db)
|
(node/get-new-config db)
|
||||||
(types/clj->json subaccounts-data)]}
|
(types/clj->json accounts-data)]}
|
||||||
(when (:intro-wizard db)
|
(when (:intro-wizard db)
|
||||||
(intro-step-forward {})))))
|
(intro-step-forward {})))))
|
||||||
|
|
||||||
|
@ -293,8 +293,8 @@
|
||||||
|
|
||||||
(re-frame/reg-fx
|
(re-frame/reg-fx
|
||||||
::save-account-and-login
|
::save-account-and-login
|
||||||
(fn [[account-data password config subaccounts-data]]
|
(fn [[multiaccount-data password config accounts-data]]
|
||||||
(status/save-account-and-login account-data
|
(status/save-account-and-login multiaccount-data
|
||||||
(security/safe-unmask-data password)
|
(security/safe-unmask-data password)
|
||||||
config
|
config
|
||||||
subaccounts-data)))
|
accounts-data)))
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
(native-module/prepare-dir-and-update-config config callback))
|
(native-module/prepare-dir-and-update-config config callback))
|
||||||
|
|
||||||
(defn save-account-and-login
|
(defn save-account-and-login
|
||||||
[account-data password config subaccounts-data]
|
[multiaccount-data password config accounts-data]
|
||||||
(native-module/save-account-and-login account-data password config subaccounts-data))
|
(native-module/save-account-and-login multiaccount-data password config accounts-data))
|
||||||
|
|
||||||
(defn login
|
(defn login
|
||||||
[account-data password]
|
[account-data password]
|
||||||
|
|
|
@ -27,9 +27,9 @@
|
||||||
#(callback (types/json->clj %))))
|
#(callback (types/json->clj %))))
|
||||||
|
|
||||||
(defn save-account-and-login
|
(defn save-account-and-login
|
||||||
[account-data password config subaccounts-data]
|
[multiaccount-data password config accounts-data]
|
||||||
(clear-web-data)
|
(clear-web-data)
|
||||||
(.saveAccountAndLogin (status) account-data password config subaccounts-data))
|
(.saveAccountAndLogin (status) multiaccount-data password config accounts-data))
|
||||||
|
|
||||||
(defn login
|
(defn login
|
||||||
[account-data password]
|
[account-data password]
|
||||||
|
|
Loading…
Reference in New Issue