[#7788] Clear mailserver details after deletion

This commit is contained in:
Roman Volosovskyi 2020-10-22 16:41:23 +03:00
parent dca26b3350
commit 5232432ec5
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
4 changed files with 17 additions and 9 deletions

View File

@ -1112,9 +1112,11 @@
(fx/defn delete
[{:keys [db] :as cofx} id]
(if (can-delete? db id)
{:db (update-in db
[:mailserver/mailservers (node/current-fleet-key db)]
dissoc id)
{:db (-> db
(update-in
[:mailserver/mailservers (node/current-fleet-key db)]
dissoc id)
(dissoc :mailserver.edit/mailserver))
::json-rpc/call
[{:method "mailservers_deleteMailserver"
:params [(name id)]

View File

@ -289,6 +289,12 @@
(assoc network
:rpc-network? (get-in network [:config :UpstreamConfig :Enabled])))))
(re-frame/reg-sub
:chain-keyword
:<- [:current-network]
(fn [network]
(ethereum/network->chain-keyword network)))
(re-frame/reg-sub
:chain-name
:<- [:current-network]
@ -2107,18 +2113,18 @@
(re-frame/reg-sub
:ens/checkout-screen
:<- [:ens/registration]
:<- [:current-network]
:<- [:chain-keyword]
:<- [:multiaccount/default-account]
:<- [:multiaccount/public-key]
:<- [:chain-id]
:<- [:balance-default]
(fn [[{:keys [custom-domain? username]}
network default-account public-key chain-id balance]]
chain default-account public-key chain-id balance]]
{:address (ethereum/normalized-hex (:address default-account))
:username username
:public-key public-key
:custom-domain? custom-domain?
:network network
:chain chain
:amount-label (ens-amount-label chain-id)
:sufficient-funds? (money/sufficient-funds?
(money/formatted->internal (money/bignumber 10) :SNT 18)

View File

@ -279,7 +279,7 @@
(let [checked? (reagent/atom false)]
(fn []
(let [{:keys [username address custom-domain? public-key
network amount-label sufficient-funds?]}
chain amount-label sufficient-funds?]}
@(re-frame/subscribe [:ens/checkout-screen])]
[react/keyboard-avoiding-view {:flex 1}
[toolbar]
@ -306,7 +306,7 @@
:typography :main-medium}}
(domain-label custom-domain?)]
[react/view {:flex 1 :min-width 24}]]]
[registration checked? (stateofus/get-cached-registrar network) address public-key]]
[registration checked? (stateofus/get-cached-registrar chain) address public-key]]
[toolbar/toolbar
{:show-border? true
:size :large

View File

@ -72,7 +72,7 @@
@(re-frame/subscribe [:multiaccount])
active-contacts-count @(re-frame/subscribe [:contacts/active-count])
tribute-to-talk @(re-frame/subscribe [:tribute-to-talk/profile])
chain @(re-frame/subscribe [:current-network])
chain @(re-frame/subscribe [:chain-keyword])
registrar (stateofus/get-cached-registrar chain)]
[:<>
[quo/list-item