Skip to content

Commit

Permalink
DTSERWONE-1882 - Update FPTI tenant, comp and product
Browse files Browse the repository at this point in the history
  • Loading branch information
grmeyer-hw-dev committed Dec 5, 2023
1 parent e65a5fd commit 6726af7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 5 additions & 2 deletions Sources/Events.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ struct EventParams: Codable {
var screenHeight: CGFloat?
var screenWidth: CGFloat?
var sdkVersion: String?
var tenentName: String?
var timestamp: Int64?
var transferMethodType: String?

Expand Down Expand Up @@ -103,6 +104,7 @@ struct EventParams: Codable {
case screenHeight = "sh"
case screenWidth = "sw"
case sdkVersion = "sdk_version"
case tenentName = "tenent_name"
case timestamp = "t"
case transferMethodType = "hyperwallet_ea_type"
}
Expand All @@ -113,9 +115,10 @@ struct EventConstants {
static let click = "cl"
static let error = "err"
static let errorTypeForm = "FORM"
static let hyperwalletComponent = "hyperwallet"
static let hyperwalletComponent = "hwiosuisdk"
static let impression = "im"
static let operatingSystem = "iOS"
static let product = "hyperwallet-ios-ui-sdk"
static let product = "dropin"
static let tenentName = "hyperwallet"
static let swiftFramework = "Swift"
}
4 changes: 3 additions & 1 deletion Sources/Insights.swift
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ public final class Insights: InsightsProtocol {
eventParams.hyperwalletIs = programToken
eventParams.operatingSystem = EventConstants.operatingSystem
eventParams.pageTechnologyFlag = EventConstants.swiftFramework
eventParams.product = EventConstants.product
eventParams.tenentName = eventParams.tenentName ?? EventConstants.tenentName
eventParams.component = eventParams.component ?? EventConstants.hyperwalletComponent
eventParams.product = eventParams.product ?? EventConstants.product
eventParams.sdkVersion = sdkVersion
eventParams.timestamp = Date().epochMilliseconds()
}
Expand Down
4 changes: 2 additions & 2 deletions Tests/InsightsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ final class InsightsTests: XCTestCase {
XCTAssertEqual(events[0].actor.trackingVisitorId, userToken, "TrackingVisitorId should be as expected")
XCTAssertEqual(events[0].channel, "mobile", "Channel should not be nil")
XCTAssertEqual(events[0].eventParams.count, 1, "EventParams count should be 1")
XCTAssertEqual(events[0].eventParams[0].component, "hyperwallet", "Component should be as expected")
XCTAssertEqual(events[0].eventParams[0].component, "hwiosuisdk", "Component should be as expected")
XCTAssertNotNil(events[0].eventParams[0].deviceModel, "Device Model should not be nil")
XCTAssertNotNil(events[0].eventParams[0].deviceName, "Device Name should not be nil")
XCTAssertNotNil(events[0].eventParams[0].deviceType, "Device Type should not be nil")
Expand All @@ -175,7 +175,7 @@ final class InsightsTests: XCTestCase {
XCTAssertNotNil(events[0].eventParams[0].orientation, "Orientation should not be nil")
XCTAssertNotNil(events[0].eventParams[0].rosettaLanguage, "Language should not be nil")
XCTAssertEqual(events[0].eventParams[0].hyperwalletIs, programToken, "IS should be as expected")
XCTAssertEqual(events[0].eventParams[0].product, "hyperwallet-ios-ui-sdk", "Product should be as expected")
XCTAssertEqual(events[0].eventParams[0].product, "dropin", "Product should be as expected")
XCTAssertEqual(events[0].eventParams[0].pageName, pageName, "PageName should be as expected")
XCTAssertEqual(events[0].eventParams[0].pageGroup, pageGroup, "Page Group should be as expected")
if let link = link {
Expand Down

0 comments on commit 6726af7

Please sign in to comment.