diff --git a/AdyenCard/Components/Stored Card/StoredCardAlertManager.swift b/AdyenCard/Components/Stored Card/StoredCardAlertManager.swift index f1cc921e5a..a263bcb1fd 100644 --- a/AdyenCard/Components/Stored Card/StoredCardAlertManager.swift +++ b/AdyenCard/Components/Stored Card/StoredCardAlertManager.swift @@ -61,9 +61,9 @@ internal final class StoredCardAlertManager: NSObject, UITextFieldDelegate, APIC }) let cancelActionTitle = localizedString(.cancelButton, localizationParameters) - let cancelAction = UIAlertAction(title: cancelActionTitle, style: .cancel) { _ in - self.completionHandler?(.failure(ComponentError.cancelled)) - self.resetAlertFields() + let cancelAction = UIAlertAction(title: cancelActionTitle, style: .cancel) { [weak self] _ in + self?.completionHandler?(.failure(ComponentError.cancelled)) + self?.resetAlertFields() } alertController.addAction(cancelAction)