Skip to content

Commit

Permalink
Fix correlation ID reset placements
Browse files Browse the repository at this point in the history
  • Loading branch information
okhan-okbay-cko committed May 30, 2024
1 parent 40cd342 commit cbfe4ca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Checkout/Source/Tokenisation/CheckoutAPIService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,16 @@ final public class CheckoutAPIService: CheckoutAPIProtocol {
case .response(let tokenResponse):
let tokenDetails = tokenDetailsFactory.create(tokenResponse: tokenResponse)

guard let self else { return }
guard let self else {
logManager.resetCorrelationID()
return
}

self.riskSDK.configure { configurationResult in
switch configurationResult {
case .failure:
completion(.success(tokenDetails))
logManager.resetCorrelationID()
case .success():
self.riskSDK.publishData(cardToken: tokenDetails.token) { _ in
logManager.queue(event: .riskSDKCompletion)
Expand Down

0 comments on commit cbfe4ca

Please sign in to comment.