diff --git a/android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/ManagementService.kt b/android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/ManagementService.kt index 870859f95ff5..d4cedd1e61e4 100644 --- a/android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/ManagementService.kt +++ b/android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/ManagementService.kt @@ -62,7 +62,6 @@ import net.mullvad.mullvadvpn.lib.model.CustomList as ModelCustomList import net.mullvad.mullvadvpn.lib.model.CustomListAlreadyExists import net.mullvad.mullvadvpn.lib.model.CustomListId import net.mullvad.mullvadvpn.lib.model.CustomListName -import net.mullvad.mullvadvpn.lib.model.DaitaSettings import net.mullvad.mullvadvpn.lib.model.DeleteCustomListError import net.mullvad.mullvadvpn.lib.model.DeleteDeviceError import net.mullvad.mullvadvpn.lib.model.Device @@ -124,7 +123,6 @@ import net.mullvad.mullvadvpn.lib.model.WebsiteAuthToken import net.mullvad.mullvadvpn.lib.model.WireguardEndpointData as ModelWireguardEndpointData import net.mullvad.mullvadvpn.lib.model.addresses import net.mullvad.mullvadvpn.lib.model.customOptions -import net.mullvad.mullvadvpn.lib.model.directOnly import net.mullvad.mullvadvpn.lib.model.enabled import net.mullvad.mullvadvpn.lib.model.entryLocation import net.mullvad.mullvadvpn.lib.model.isMultihopEnabled @@ -510,21 +508,12 @@ class ManagementService( .mapEmpty() suspend fun setDaitaEnabled(enabled: Boolean): Either = - Either.catch { - val currentDaitaSettings = getSettings().tunnelOptions.wireguard.daitaSettings - val updatedDaitaSettings = DaitaSettings.enabled.set(currentDaitaSettings, enabled) - grpc.setDaitaSettings(updatedDaitaSettings.fromDomain()) - } + Either.catch { grpc.setEnableDaita(BoolValue.of(enabled)) } .mapLeft(SetDaitaSettingsError::Unknown) .mapEmpty() suspend fun setDaitaDirectOnly(enabled: Boolean): Either = - Either.catch { - val currentDaitaSettings = getSettings().tunnelOptions.wireguard.daitaSettings - val updatedDaitaSettings = - DaitaSettings.directOnly.set(currentDaitaSettings, enabled) - grpc.setDaitaSettings(updatedDaitaSettings.fromDomain()) - } + Either.catch { grpc.setDaitaDirectOnly(BoolValue.of(enabled)) } .mapLeft(SetDaitaSettingsError::Unknown) .mapEmpty()