Disallow recovering of an existing multiaccount

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
Roman Volosovskyi 2020-02-10 12:24:42 +02:00 committed by Andrey Shovkoplyas
parent 481092dd25
commit b2a70c8331
No known key found for this signature in database
GPG Key ID: EAAB7C8622D860A4
1 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@
(defn existing-account?
[root-key multiaccounts]
(contains? multiaccounts (:key-uid root-key)))
(contains? multiaccounts (:keyUid root-key)))
(re-frame/reg-fx
::validate-mnemonic
@ -130,7 +130,7 @@
(fx/defn on-import-multiaccount-success
{:events [::import-multiaccount-success]}
[{:keys [db] :as cofx} {:keys [key-uid] :as root-data} derived-data]
[{:keys [db] :as cofx} root-data derived-data]
(let [multiaccounts (:multiaccounts/multiaccounts db)]
(fx/merge
cofx
@ -140,7 +140,7 @@
:step :recovery-success
:forward-action :multiaccounts.recover/re-encrypt-pressed)}
(when (existing-account? root-data multiaccounts)
(show-existing-multiaccount-alert key-uid))
(show-existing-multiaccount-alert (:keyUid root-data)))
(navigation/navigate-to-cofx :recover-multiaccount-success nil))))
(fx/defn enter-phrase-pressed