[#7788] Clear mailserver details after deletion
This commit is contained in:
parent
dca26b3350
commit
5232432ec5
|
@ -1112,9 +1112,11 @@
|
||||||
(fx/defn delete
|
(fx/defn delete
|
||||||
[{:keys [db] :as cofx} id]
|
[{:keys [db] :as cofx} id]
|
||||||
(if (can-delete? db id)
|
(if (can-delete? db id)
|
||||||
{:db (update-in db
|
{:db (-> db
|
||||||
|
(update-in
|
||||||
[:mailserver/mailservers (node/current-fleet-key db)]
|
[:mailserver/mailservers (node/current-fleet-key db)]
|
||||||
dissoc id)
|
dissoc id)
|
||||||
|
(dissoc :mailserver.edit/mailserver))
|
||||||
::json-rpc/call
|
::json-rpc/call
|
||||||
[{:method "mailservers_deleteMailserver"
|
[{:method "mailservers_deleteMailserver"
|
||||||
:params [(name id)]
|
:params [(name id)]
|
||||||
|
|
|
@ -289,6 +289,12 @@
|
||||||
(assoc network
|
(assoc network
|
||||||
:rpc-network? (get-in network [:config :UpstreamConfig :Enabled])))))
|
: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
|
(re-frame/reg-sub
|
||||||
:chain-name
|
:chain-name
|
||||||
:<- [:current-network]
|
:<- [:current-network]
|
||||||
|
@ -2107,18 +2113,18 @@
|
||||||
(re-frame/reg-sub
|
(re-frame/reg-sub
|
||||||
:ens/checkout-screen
|
:ens/checkout-screen
|
||||||
:<- [:ens/registration]
|
:<- [:ens/registration]
|
||||||
:<- [:current-network]
|
:<- [:chain-keyword]
|
||||||
:<- [:multiaccount/default-account]
|
:<- [:multiaccount/default-account]
|
||||||
:<- [:multiaccount/public-key]
|
:<- [:multiaccount/public-key]
|
||||||
:<- [:chain-id]
|
:<- [:chain-id]
|
||||||
:<- [:balance-default]
|
:<- [:balance-default]
|
||||||
(fn [[{:keys [custom-domain? username]}
|
(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))
|
{:address (ethereum/normalized-hex (:address default-account))
|
||||||
:username username
|
:username username
|
||||||
:public-key public-key
|
:public-key public-key
|
||||||
:custom-domain? custom-domain?
|
:custom-domain? custom-domain?
|
||||||
:network network
|
:chain chain
|
||||||
:amount-label (ens-amount-label chain-id)
|
:amount-label (ens-amount-label chain-id)
|
||||||
:sufficient-funds? (money/sufficient-funds?
|
:sufficient-funds? (money/sufficient-funds?
|
||||||
(money/formatted->internal (money/bignumber 10) :SNT 18)
|
(money/formatted->internal (money/bignumber 10) :SNT 18)
|
||||||
|
|
|
@ -279,7 +279,7 @@
|
||||||
(let [checked? (reagent/atom false)]
|
(let [checked? (reagent/atom false)]
|
||||||
(fn []
|
(fn []
|
||||||
(let [{:keys [username address custom-domain? public-key
|
(let [{:keys [username address custom-domain? public-key
|
||||||
network amount-label sufficient-funds?]}
|
chain amount-label sufficient-funds?]}
|
||||||
@(re-frame/subscribe [:ens/checkout-screen])]
|
@(re-frame/subscribe [:ens/checkout-screen])]
|
||||||
[react/keyboard-avoiding-view {:flex 1}
|
[react/keyboard-avoiding-view {:flex 1}
|
||||||
[toolbar]
|
[toolbar]
|
||||||
|
@ -306,7 +306,7 @@
|
||||||
:typography :main-medium}}
|
:typography :main-medium}}
|
||||||
(domain-label custom-domain?)]
|
(domain-label custom-domain?)]
|
||||||
[react/view {:flex 1 :min-width 24}]]]
|
[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
|
[toolbar/toolbar
|
||||||
{:show-border? true
|
{:show-border? true
|
||||||
:size :large
|
:size :large
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
@(re-frame/subscribe [:multiaccount])
|
@(re-frame/subscribe [:multiaccount])
|
||||||
active-contacts-count @(re-frame/subscribe [:contacts/active-count])
|
active-contacts-count @(re-frame/subscribe [:contacts/active-count])
|
||||||
tribute-to-talk @(re-frame/subscribe [:tribute-to-talk/profile])
|
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)]
|
registrar (stateofus/get-cached-registrar chain)]
|
||||||
[:<>
|
[:<>
|
||||||
[quo/list-item
|
[quo/list-item
|
||||||
|
|
Loading…
Reference in New Issue