Skip to content

Commit

Permalink
chore: dont send inital call if dropin
Browse files Browse the repository at this point in the history
  • Loading branch information
erenbesel committed Feb 5, 2024
1 parent 30bc5d6 commit da8fe53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Adyen/Core/Core Protocols/PresentableComponent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ public protocol TrackableComponent: Component {
extension TrackableComponent where Self: ViewControllerDelegate {

public func viewWillAppear(viewController: UIViewController) {
// initial call is not needed again if inside dropIn
// guard !_isDropIn else { return }
sendInitialAnalytics()
}
}
Expand All @@ -80,6 +78,8 @@ extension TrackableComponent where Self: ViewControllerDelegate {
extension TrackableComponent where Self: PaymentMethodAware {

public func sendInitialAnalytics() {
// initial call is not needed again if inside dropIn
guard !_isDropIn else { return }
let flavor: TelemetryFlavor = .components(type: paymentMethod.type)
let amount = context.payment?.amount
let additionalFields = AdditionalAnalyticsFields(amount: amount, sessionId: AdyenAnalytics.sessionId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ internal class BACSDirectDebitComponentTracker: BACSDirectDebitComponentTrackerP
// MARK: - BACSDirectDebitComponentTrackerProtocol

internal func sendInitialAnalytics() {
// initial call is not needed again if inside dropIn
guard !isDropIn else { return }
let flavor: TelemetryFlavor = .components(type: paymentMethod.type)
let amount = context.payment?.amount
let additionalFields = AdditionalAnalyticsFields(amount: amount, sessionId: AdyenAnalytics.sessionId)
Expand Down

0 comments on commit da8fe53

Please sign in to comment.