feat(wallet): Add modal to remove `:key` and `:seed` accounts (#20569)
This commit is contained in:
parent
b17f2892c7
commit
1e40d49369
|
@ -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)))
|
||||
|
|
|
@ -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 it’s 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",
|
||||
|
|
Loading…
Reference in New Issue