diff --git a/Example/StripeConnectExample/StripeConnectExample/Storage/AppSettings.swift b/Example/StripeConnectExample/StripeConnectExample/Storage/AppSettings.swift index c204a7e64d3..8e2511c306e 100644 --- a/Example/StripeConnectExample/StripeConnectExample/Storage/AppSettings.swift +++ b/Example/StripeConnectExample/StripeConnectExample/Storage/AppSettings.swift @@ -90,3 +90,9 @@ class AppSettings { defaults.setValue(merchant?.id, forKey: Constants.selectedMerchantKey) } } + +private extension UserDefaults { + func string(forKey defaultName: String, defaultValue: String = "") -> String { + self.string(forKey: defaultName) ?? defaultValue + } +}