feat(wallet): Add modal to remove `:key` and `:seed` accounts (#20569)

This commit is contained in:
Ulises Manuel 2024-07-03 11:48:10 -06:00 committed by GitHub
parent b17f2892c7
commit 1e40d49369
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 24 additions and 4 deletions

View File

@ -88,10 +88,29 @@
:address address
:toast-message (i18n/label :t/watched-account-removed)}]])
(defn- private-key-address-flow
[{:keys [address name emoji color] :as _account}]
[:<>
[quo/drawer-top
{:title (i18n/label :t/remove-account-title)
:type :context-tag
:context-tag-type :account
:account-name name
:emoji emoji
:customization-color color}]
[rn/view {:style style/desc-container}
[quo/text {:weight :medium}
(i18n/label :t/remove-private-key-address-desc)]]
[footer
{:submit-disabled? false
:address address
:toast-message (i18n/label :t/account-removed)}]])
(defn view
[]
(let [{:keys [type] :as account} (rf/sub [:wallet/current-viewing-account])]
(case type
:generated [recovery-phase-flow account]
:watch [watched-address-flow account]
(let [{account-type :type :as account} (rf/sub [:wallet/current-viewing-account])]
(case account-type
(:generated :seed) [recovery-phase-flow account]
:watch [watched-address-flow account]
:key [private-key-address-flow account]
nil)))

View File

@ -2603,6 +2603,7 @@
"remove-watched-address-desc": "The watched address will be removed from all of your synced devices.",
"remove-account-title": "Remove account",
"remove-account-desc": "The account will be removed from all of your synced devices. Make sure you have a backup of your key pair or recovery phrase and derivation path (if its not default).",
"remove-private-key-address-desc": "The account will be removed from all of your synced devices. Make sure you have a backup of your key pair or recovery phrase.",
"derivation-path-copied": "Derivation path copied",
"remove-account-confirmation": "I have taken note of the derivation path",
"edit-receiver-networks": "Edit receiver networks",