Skip to content

Commit

Permalink
Reorganize properties in NetworkingOTPDataSource
Browse files Browse the repository at this point in the history
  • Loading branch information
mats-stripe committed Jan 21, 2025
1 parent dba58e6 commit 45040b1
Showing 1 changed file with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,31 @@ protocol NetworkingOTPDataSource: AnyObject {
final class NetworkingOTPDataSourceImplementation: NetworkingOTPDataSource {

let otpType: String
let pane: FinancialConnectionsSessionManifest.NextPane
let analyticsClient: FinancialConnectionsAnalyticsClient
private let emailAddress: String
private let customEmailType: String?
private let connectionsMerchantName: String?
private let apiClient: any FinancialConnectionsAPI
private let manifest: FinancialConnectionsSessionManifest
private let clientSecret: String
weak var delegate: NetworkingOTPDataSourceDelegate?

private var consumerSession: ConsumerSessionData? {
didSet {
if let consumerSession = consumerSession {
delegate?.networkingOTPDataSource(self, didUpdateConsumerSession: consumerSession)
}
}
}
let pane: FinancialConnectionsSessionManifest.NextPane
private let apiClient: any FinancialConnectionsAPI
private let manifest: FinancialConnectionsSessionManifest
private let clientSecret: String
let analyticsClient: FinancialConnectionsAnalyticsClient
let isTestMode: Bool
let theme: FinancialConnectionsTheme
weak var delegate: NetworkingOTPDataSourceDelegate?

var isTestMode: Bool {
manifest.isTestMode
}

var theme: FinancialConnectionsTheme {
manifest.theme
}

init(
otpType: String,
Expand All @@ -69,8 +76,6 @@ final class NetworkingOTPDataSourceImplementation: NetworkingOTPDataSource {
self.apiClient = apiClient
self.clientSecret = clientSecret
self.analyticsClient = analyticsClient
self.isTestMode = manifest.isTestMode
self.theme = manifest.theme
}

func lookupConsumerSession() -> Future<LookupConsumerSessionResponse> {
Expand Down

0 comments on commit 45040b1

Please sign in to comment.