Optimized code

This commit is contained in:
Lumaa 2024-01-05 12:54:57 +01:00
parent ff3bcb8959
commit a62c0304f4

View File

@ -30,19 +30,13 @@ public class AccountManager {
}
public func forceClient() -> Client {
if client != nil {
return client!
} else {
fatalError("Client is not existant in that context")
}
guard client != nil else { fatalError("Client is not existant in that context") }
return client!
}
public func forceAccount() -> Account {
if account != nil {
return account!
} else {
fatalError("Account is not existant in that context and couldn't be fetched from Client")
}
guard account != nil else { fatalError("Account is not existant in that context") }
return account!
}
public func fetchAccount() async -> Account? {