//
// Copyright © 2023 Nevis Security AG. All rights reserved.
//

import Foundation

class PinValidatedMessage: ChannelInMessage {
	// MARK: Properties

	var errorMessage: String?
	var cause: String?

	// MARK: Decodable

	enum CodingKeys: String, CodingKey {
		case errorMessage
		case cause
	}

	required init(from decoder: Decoder) throws {
		let container = try decoder.container(keyedBy: CodingKeys.self)
		self.errorMessage = try container.decodeIfPresent(String.self, forKey: .errorMessage)
		self.cause = try container.decodeIfPresent(String.self, forKey: .cause)
		try super.init(from: decoder)
	}
}
