[#21828] Close the flows for adding accounts in keycard accounts (#21829)

This commit is contained in:
flexsurfer 2024-12-16 17:49:59 +01:00 committed by GitHub
parent 8d615801d1
commit c19128e8b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 18 additions and 13 deletions

View File

@ -15,19 +15,24 @@
(defn new-account (defn new-account
[] []
[quo/action-drawer (let [keycard? (rf/sub [:keycard/keycard-profile?])]
[[{:icon :i/add [quo/action-drawer
:accessibility-label :start-a-new-chat [[{:icon :i/add
:label (i18n/label :t/add-account) :accessibility-label :start-a-new-chat
:sub-label (i18n/label :t/add-account-description) :label (i18n/label :t/add-account)
:on-press #(rf/dispatch [:navigate-to :screen/wallet.create-account])} :sub-label (i18n/label :t/add-account-description)
(when (ff/enabled? ::ff/wallet.add-watched-address) :on-press (fn []
{:icon :i/reveal (if keycard?
:accessibility-label :add-a-contact (rf/dispatch [:keycard/feature-unavailable-show
:label (i18n/label :t/add-address-to-watch) {:feature-name :wallet.new-account}])
:sub-label (i18n/label :t/add-address-to-watch-description) (rf/dispatch [:navigate-to :screen/wallet.create-account])))}
:on-press #(rf/dispatch [:navigate-to :screen/wallet.add-address-to-watch]) (when (ff/enabled? ::ff/wallet.add-watched-address)
:add-divider? true})]]]) {:icon :i/reveal
:accessibility-label :add-a-contact
:label (i18n/label :t/add-address-to-watch)
:sub-label (i18n/label :t/add-address-to-watch-description)
:on-press #(rf/dispatch [:navigate-to :screen/wallet.add-address-to-watch])
:add-divider? true})]]]))
(defn- new-account-card-data (defn- new-account-card-data
[] []