Refactor and Scope user settings to pubkey

This commit is contained in:
William Casarin
2023-04-21 16:21:01 -07:00
parent 9bf8349db6
commit aa559b2916
10 changed files with 295 additions and 312 deletions

View File

@@ -7,7 +7,7 @@
import Foundation
enum Wallet: String, CaseIterable, Identifiable {
enum Wallet: String, CaseIterable, Identifiable, StringCodable {
var id: String { self.rawValue }
struct Model: Identifiable, Hashable {
@@ -20,6 +20,17 @@ enum Wallet: String, CaseIterable, Identifiable {
var image: String
}
func to_string() -> String {
return rawValue
}
init?(from string: String) {
guard let w = Wallet(rawValue: string) else {
return nil
}
self = w
}
// New url prefixes needed to be added to LSApplicationQueriesSchemes
case system_default_wallet
case strike