Skip to content

Commit

Permalink
style: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
FlaviuExtPrimer committed Feb 7, 2025
1 parent 96998fd commit 7ab3fac
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,19 @@ extension PrimerSettings {
case "latest":
apiVersion = PrimerApiVersion.latest
default:
throw RNTNativeError(errorId: "native-ios", errorDescription: "The value of the 'apiVersion' string is invalid.", recoverySuggestion: "Provide a valid 'apiVersion' string")
throw RNTNativeError(
errorId: "native-ios",
errorDescription: "The value of the 'apiVersion' string is invalid.",
recoverySuggestion: "Provide a valid 'apiVersion' string"
)
}
}

var threeDsOptions: PrimerThreeDsOptions?
if let rnThreeDsAppRequestorUrlStr = (((settingsJson["paymentMethodOptions"] as? [String: Any])?["threeDsOptions"] as? [String: Any])?["iOS"] as? [String: Any])?["threeDsAppRequestorUrl"] as? String {
if let paymentMethodOptions = settingsJson["paymentMethodOptions"] as? [String: Any],
let threeDsOptionsDict = paymentMethodOptions["threeDsOptions"] as? [String: Any],
let iOSOptions = threeDsOptionsDict["iOS"] as? [String: Any],
let rnThreeDsAppRequestorUrlStr = iOSOptions["threeDsAppRequestorUrl"] as? String {
threeDsOptions = PrimerThreeDsOptions(threeDsAppRequestorUrl: rnThreeDsAppRequestorUrlStr)
}

Expand All @@ -210,7 +217,9 @@ extension PrimerSettings {
} else if let merchantName = mandateDataMap["merchantName"] {
mandateData = .templateMandate(merchantName: merchantName)
} else {
PrimerLogging.shared.logger.warn(message: "Found mandate data but no resource key or merchant name - check your stripe config")
PrimerLogging.shared.logger.warn(
message: "Found mandate data but no resource key or merchant name - check your stripe config"
)
}
} else {
PrimerLogging.shared.logger.warn(message: "Found stripe options but no mandate data - check your stripe config")
Expand Down

0 comments on commit 7ab3fac

Please sign in to comment.