diff --git a/Sources/Models/HCert.swift b/Sources/Models/HCert.swift index 945adcc..8b6142f 100644 --- a/Sources/Models/HCert.swift +++ b/Sources/Models/HCert.swift @@ -145,11 +145,13 @@ public struct HCert { public init?(from payload: String, errors: ParseErrors? = nil) { + let payload = payload if Self.checkCH1PreffixExist(payload) { fullPayloadString = payload payloadString = Self.parsePrefix(payload) } else { - fullPayloadString = Self.supportedPrefixes.first ?? "" + payload + fullPayloadString = Self.supportedPrefixes.first ?? "" + fullPayloadString = fullPayloadString + payload payloadString = payload }