 fileprivate enum MetricsPayloadData: Encodable {
     case launch(LaunchData)
     case checkout(CheckoutData)
-    case enableSegWit(SegWitData)
-    case viewLegacyAddress(SegWitData)
+    case enableSegWit(EnableSegWitData)
+    case viewLegacyAddress(ViewLegacyAddressData)
     
     var metric: String {
         switch self {

    let timestamp: Int
}

fileprivate struct SegWitData: Encodable {
    let timestamp = Int(Date().timeIntervalSince1970)
}


extension MetricsPayload {
    static var enableSegWit : MetricsPayload {
        return MetricsPayload(data: MetricsPayloadData.enableSegWit(EnableSegWitData()))
    }
    
    static var viewLegacyAddress : MetricsPayload {
        return MetricsPayload(data: MetricsPayloadData.viewLegacyAddress(ViewLegacyAddressData()))
    }
}

