diff --git a/Sources/XyoClient/Address/AccountServices.swift b/Sources/XyoClient/Address/AccountServices.swift index c58cd2a..1c6cec3 100644 --- a/Sources/XyoClient/Address/AccountServices.swift +++ b/Sources/XyoClient/Address/AccountServices.swift @@ -1,7 +1,7 @@ import Foundation public class AccountServices { - public static func getNamedAccount(name: String = "default") -> AccountInstance { + public static func getNamedAccount(name: String = "DefaultAccount") -> AccountInstance { // let _ = removeFromKeychain(key: name) if let existingAccount = getStoredAccount(name: name) { return existingAccount diff --git a/Sources/XyoClient/Api/Archivist/ArchivistApiClient.swift b/Sources/XyoClient/Api/Archivist/ArchivistApiClient.swift index 53fbe14..fcc6197 100644 --- a/Sources/XyoClient/Api/Archivist/ArchivistApiClient.swift +++ b/Sources/XyoClient/Api/Archivist/ArchivistApiClient.swift @@ -32,7 +32,7 @@ public class XyoArchivistApiClient { private init(_ config: XyoArchivistApiConfig, _ account: AccountInstance?) { self.config = config - self.queryAccount = account ?? Account() + self.queryAccount = account ?? AccountServices.getNamedAccount(name: "DefaultArchivistApiClientAccount") } public func insert( diff --git a/Sources/XyoClient/Panel/Panel.swift b/Sources/XyoClient/Panel/Panel.swift index 792af25..7506738 100644 --- a/Sources/XyoClient/Panel/Panel.swift +++ b/Sources/XyoClient/Panel/Panel.swift @@ -26,10 +26,10 @@ public class XyoPanel { account: AccountInstance? = nil, witnesses: [WitnessModule] = [], apiDomain: String = XyoArchivistApiClient.DefaultApiDomain, - archive: String = XyoArchivistApiClient.DefaultArchivist + apiModule: String = XyoArchivistApiClient.DefaultArchivist ) { - let panelAccount = account ?? Account.random() - let apiConfig = XyoArchivistApiConfig(archive, apiDomain) + let panelAccount = account ?? AccountServices.getNamedAccount(name: "DefaultPanelAccount") + let apiConfig = XyoArchivistApiConfig(apiModule, apiDomain) let archivist = XyoArchivistApiClient.get(apiConfig) self.init(account: panelAccount, witnesses: witnesses, archivists: [archivist]) }