From bc6620a408160a356663813f7797950e0e5e01ba Mon Sep 17 00:00:00 2001 From: Viktoriia Kostyleva Date: Mon, 31 Oct 2022 16:02:52 +0200 Subject: [PATCH 1/2] Fix typo --- .../Services/SubscriptionsService/SubscriptionsService.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SolardVPNCommunityCoreiOS/SOLARdVPNCommunityCoreiOS/Services/SubscriptionsService/SubscriptionsService.swift b/SolardVPNCommunityCoreiOS/SOLARdVPNCommunityCoreiOS/Services/SubscriptionsService/SubscriptionsService.swift index dd688d6..6abfd14 100644 --- a/SolardVPNCommunityCoreiOS/SOLARdVPNCommunityCoreiOS/Services/SubscriptionsService/SubscriptionsService.swift +++ b/SolardVPNCommunityCoreiOS/SOLARdVPNCommunityCoreiOS/Services/SubscriptionsService/SubscriptionsService.swift @@ -12,7 +12,7 @@ import SentinelWallet enum SubscriptionsServiceError: String, LocalizedError { case missingMnemonic = "missing_mnemonic" case paymentFailed = "payment_failed" - case faliToCancelSubscription = "fali_to_cancel_subscription" + case failToCancelSubscription = "fail_to_cancel_subscription" case activeSession = "active_session" var errorDescription: String? { @@ -95,7 +95,7 @@ extension SubscriptionsService: SubscriptionsServiceType { completion(.failure(SubscriptionsServiceError.activeSession)) return } - completion(.failure(SubscriptionsServiceError.faliToCancelSubscription)) + completion(.failure(SubscriptionsServiceError.failToCancelSubscription)) } } } From 761156dbd1c509a812c949928c49ed21bb413cd0 Mon Sep 17 00:00:00 2001 From: Viktoriia Kostyleva Date: Mon, 31 Oct 2022 17:03:51 +0200 Subject: [PATCH 2/2] Add errors localization --- .../NETunnelProviderProtocol+Extension.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SolardVPNCommunityCoreiOS/Shared/Extentions/NETunnelProviderProtocol+Extension.swift b/SolardVPNCommunityCoreiOS/Shared/Extentions/NETunnelProviderProtocol+Extension.swift index 5e54d8e..f384d0e 100644 --- a/SolardVPNCommunityCoreiOS/Shared/Extentions/NETunnelProviderProtocol+Extension.swift +++ b/SolardVPNCommunityCoreiOS/Shared/Extentions/NETunnelProviderProtocol+Extension.swift @@ -7,11 +7,11 @@ import NetworkExtension import WireGuardKit enum PacketTunnelProviderError: String, LocalizedError { - case savedProtocolConfigurationIsInvalid - case dnsResolutionFailure - case couldNotStartBackend - case couldNotDetermineFileDescriptor - case couldNotSetNetworkSettings + case savedProtocolConfigurationIsInvalid = "saved_protocol_configuration_is_invalid" + case dnsResolutionFailure = "dns_resolution_failure" + case couldNotStartBackend = "could_not_start_backend" + case couldNotDetermineFileDescriptor = "could_not_determine_file_descriptor" + case couldNotSetNetworkSettings = "could_not_set_network_settings" var errorDescription: String? { self.rawValue