From f2f3ef42a1e49a933e09f1f0afa6ca634dd43484 Mon Sep 17 00:00:00 2001 From: Oleg Tverdokhleb Date: Sat, 17 Oct 2020 19:42:16 +0300 Subject: [PATCH] [NO-TASK] Fix metrics --- .../Private/Services/Analytics/AnalyticsEvent.swift | 4 ++-- .../Private/Services/Analytics/AnalyticsProvider.swift | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/YandexCheckoutPayments/Private/Services/Analytics/AnalyticsEvent.swift b/YandexCheckoutPayments/Private/Services/Analytics/AnalyticsEvent.swift index 87c6ae8b..56c62450 100644 --- a/YandexCheckoutPayments/Private/Services/Analytics/AnalyticsEvent.swift +++ b/YandexCheckoutPayments/Private/Services/Analytics/AnalyticsEvent.swift @@ -51,8 +51,8 @@ enum AnalyticsEvent { /// The user is not authorized. case withoutAuth - /// Successfully completed authorization in Yandex.Login. - case yandexLogin + /// Successfully completed authorization in Money center authorization + case moneyAuth /// Successful payment authorization in the wallet. case paymentAuth diff --git a/YandexCheckoutPayments/Private/Services/Analytics/AnalyticsProvider.swift b/YandexCheckoutPayments/Private/Services/Analytics/AnalyticsProvider.swift index a8d51cc7..ade0f635 100644 --- a/YandexCheckoutPayments/Private/Services/Analytics/AnalyticsProvider.swift +++ b/YandexCheckoutPayments/Private/Services/Analytics/AnalyticsProvider.swift @@ -24,15 +24,15 @@ struct AnalyticsProvider: AnalyticsProviding { if hasReusableWalletToken { authType = .paymentAuth tokenType = .multiple - // TODO: MOC-762 - // } else if authorizationService.getYandexToken() != nil { - // authType = .yandexLogin - // tokenType = .single + } else if keyValueStoring.getString( + for: KeyValueStoringKeys.moneyCenterAuthToken + ) != nil { + authType = .moneyAuth + tokenType = .single } else { authType = .withoutAuth tokenType = nil } - return (authType, tokenType) } }