[#21915] Wrong address generated after creation a new keypair (#21921)

This commit is contained in:
flexsurfer 2025-01-13 17:06:59 +01:00 committed by GitHub
parent 394648b377
commit f56bd54fd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 3 deletions

View File

@ -20,7 +20,8 @@
(rf/dispatch [:navigate-back])
(rf/dispatch [:open-modal :screen/confirm-backup
{:masked-seed-phrase masked-seed-phrase
:on-success #(rf/dispatch [:keycard/create.phrase-backed-up %])}]))
:on-success #(rf/dispatch [:keycard/create.phrase-backed-up
masked-seed-phrase])}]))
(rf/reg-event-fx :keycard/create.get-phrase
(fn [{:keys [db]}]

View File

@ -44,6 +44,16 @@
(rf/reg-event-fx :wallet/confirm-account-origin confirm-account-origin)
(defn store-new-seed-phrase
[{:keys [db]} [{:keys [seed-phrase]}]]
{:db (update-in db
[:wallet :ui :create-account :new-keypair]
assoc
:seed-phrase
seed-phrase)})
(rf/reg-event-fx :wallet/store-new-seed-phrase store-new-seed-phrase)
(defn seed-phrase-validated
[{:keys [db]} [seed-phrase key-uid on-error]]
(let [keypair-already-added? (-> db

View File

@ -14,8 +14,12 @@
[masked-seed-phrase]
(rf/dispatch [:navigate-to :screen/confirm-backup
{:masked-seed-phrase masked-seed-phrase
:on-success #(rf/dispatch [:navigate-to :screen/wallet.keypair-name
{:workflow :new-keypair}])}]))
:on-success (fn []
(rf/dispatch [:wallet/store-new-seed-phrase
{:seed-phrase
masked-seed-phrase}])
(rf/dispatch [:navigate-to :screen/wallet.keypair-name
{:workflow :new-keypair}]))}]))
(defn- keypair-options
[]