From 5b1937cd14060d07409ec6ac5495fe4b5d074f8a Mon Sep 17 00:00:00 2001 From: Alexander Osokin Date: Mon, 28 Nov 2022 21:33:02 +0500 Subject: [PATCH] IOS-2618 Refactor OnlineCardVerifier initialization --- .../Operations/Attestation/OnlineCardVerifier.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/TangemSdk/TangemSdk/Operations/Attestation/OnlineCardVerifier.swift b/TangemSdk/TangemSdk/Operations/Attestation/OnlineCardVerifier.swift index 0c6c0fe39..8866eee7e 100644 --- a/TangemSdk/TangemSdk/Operations/Attestation/OnlineCardVerifier.swift +++ b/TangemSdk/TangemSdk/Operations/Attestation/OnlineCardVerifier.swift @@ -12,9 +12,11 @@ import Combine /// Online verification for Tangem cards. Do not use for developer cards @available(iOS 13.0, *) public class OnlineCardVerifier { - private let networkService = NetworkService() + private let networkService: NetworkService - public init() {} + public init(with networkService: NetworkService = .init()) { + self.networkService = networkService + } deinit { Log.debug("OnlineCardVerifier deinit")