diff options
| author | Jon Petersson <jon.petersson@mullvad.net> | 2025-10-10 13:54:19 +0200 |
|---|---|---|
| committer | Jon Petersson <jon.petersson@mullvad.net> | 2025-10-15 13:52:19 +0200 |
| commit | dd1c723a5713e72fb2d7b5de80b42c55949bb19d (patch) | |
| tree | 7e2fe3f3d120dbec2ae2f520d30f6fcb168052f2 /ios/MullvadREST/MullvadAPI/APIHandlers | |
| parent | e9824c6da795e6d429519003f149031457a85123 (diff) | |
| download | mullvadvpn-dd1c723a5713e72fb2d7b5de80b42c55949bb19d.tar.xz mullvadvpn-dd1c723a5713e72fb2d7b5de80b42c55949bb19d.zip | |
Fix broken payments on production builds
Diffstat (limited to 'ios/MullvadREST/MullvadAPI/APIHandlers')
| -rw-r--r-- | ios/MullvadREST/MullvadAPI/APIHandlers/MullvadAPIProxy.swift | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/ios/MullvadREST/MullvadAPI/APIHandlers/MullvadAPIProxy.swift b/ios/MullvadREST/MullvadAPI/APIHandlers/MullvadAPIProxy.swift index fb458532d1..b48095abf5 100644 --- a/ios/MullvadREST/MullvadAPI/APIHandlers/MullvadAPIProxy.swift +++ b/ios/MullvadREST/MullvadAPI/APIHandlers/MullvadAPIProxy.swift @@ -23,11 +23,6 @@ public protocol APIQuerying: Sendable { completionHandler: @escaping @Sendable ProxyCompletionHandler<REST.ServerRelaysCacheResponse> ) -> Cancellable - func createApplePayment( - accountNumber: String, - receiptString: Data - ) -> any RESTRequestExecutor<REST.CreateApplePaymentResponse> - func legacyStorekitPayment( accountNumber: String, request: LegacyStorekitRequest, @@ -156,16 +151,6 @@ extension REST { AnyCancellable() } - /// Not implemented. Use `RESTAPIProxy` instead. - public func createApplePayment( - accountNumber: String, - receiptString: Data - ) -> any RESTRequestExecutor<REST.CreateApplePaymentResponse> { - RESTRequestExecutorStub<REST.CreateApplePaymentResponse>(success: { - .timeAdded(0, .now) - }) - } - public func checkApiAvailability( retryStrategy: REST.RetryStrategy, accessMethod: PersistentAccessMethod, @@ -328,35 +313,3 @@ extension REST { let newExpiry: Date } } - -// TODO: Remove when Mullvad API is production ready. -private struct RESTRequestExecutorStub<Success: Sendable>: RESTRequestExecutor { - var success: (() -> Success)? - - func execute(completionHandler: @escaping (Result<Success, Error>) -> Void) -> Cancellable { - if let result = success?() { - completionHandler(.success(result)) - } - return AnyCancellable() - } - - func execute( - retryStrategy: REST.RetryStrategy, - completionHandler: @escaping (Result<Success, Error>) -> Void - ) -> Cancellable { - if let result = success?() { - completionHandler(.success(result)) - } - return AnyCancellable() - } - - func execute() async throws -> Success { - try await execute(retryStrategy: .noRetry) - } - - func execute(retryStrategy: REST.RetryStrategy) async throws -> Success { - guard let success = success else { throw POSIXError(.EINVAL) } - - return success() - } -} |
