From 302faca32f849cb1d63202b0a905077fba56bfa9 Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Thu, 9 Jun 2022 12:07:29 +0300 Subject: [PATCH] Pull request: 4642 update dns addresses on encryption update Updates #4642 Squashed commit of the following: commit 75729120d3532dc2bd12b6c9e724a691043a1870 Merge: 5b681867 1c1ca1c6 Author: Ildar Kamalov Date: Thu Jun 9 11:58:13 2022 +0300 Merge branch 'master' into 4642-dns-privacy commit 5b68186705c3a9287a44e33c8cf7ab79060f35a4 Author: Ildar Kamalov Date: Tue Jun 7 18:39:02 2022 +0300 fix commit 46a9346154d33206e829a97021f3ef47ac2a5611 Author: Ildar Kamalov Date: Tue Jun 7 18:18:18 2022 +0300 client: update dns addresses on encryption update --- client/src/actions/encryption.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/src/actions/encryption.js b/client/src/actions/encryption.js index 36faf2ec..2f58abd3 100644 --- a/client/src/actions/encryption.js +++ b/client/src/actions/encryption.js @@ -24,6 +24,7 @@ export const getTlsStatus = () => async (dispatch) => { export const setTlsConfigRequest = createAction('SET_TLS_CONFIG_REQUEST'); export const setTlsConfigFailure = createAction('SET_TLS_CONFIG_FAILURE'); export const setTlsConfigSuccess = createAction('SET_TLS_CONFIG_SUCCESS'); +export const dnsStatusSuccess = createAction('DNS_STATUS_SUCCESS'); export const setTlsConfig = (config) => async (dispatch, getState) => { dispatch(setTlsConfigRequest()); @@ -39,6 +40,12 @@ export const setTlsConfig = (config) => async (dispatch, getState) => { const response = await apiClient.setTlsConfig(values); response.certificate_chain = atob(response.certificate_chain); response.private_key = atob(response.private_key); + + const dnsStatus = await apiClient.getGlobalStatus(); + if (dnsStatus) { + dispatch(dnsStatusSuccess(dnsStatus)); + } + dispatch(setTlsConfigSuccess(response)); dispatch(addSuccessToast('encryption_config_saved')); redirectToCurrentProtocol(response, httpPort);