diff --git a/SimpleWallet/Modules/Models/Vote.swift b/SimpleWallet/Modules/Models/Vote.swift index 627e0ae..0ef5f09 100644 --- a/SimpleWallet/Modules/Models/Vote.swift +++ b/SimpleWallet/Modules/Models/Vote.swift @@ -21,3 +21,8 @@ struct Vote: Codable { } } +extension Vote { + init(from data: Data) { + self = try! JSONDecoder().decode(Vote.self, from: data) + } +}