From 525321cfa4d3d961a1d85a2f9a78804c6bf4ab17 Mon Sep 17 00:00:00 2001 From: prajeet Date: Sat, 28 Jan 2023 13:46:12 +0545 Subject: [PATCH] Stopped calling authenticated endpoints if authtoken is does not exist for currentClient. (#463) --- Packages/Env/Sources/Env/CurrentAccount.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/Env/Sources/Env/CurrentAccount.swift b/Packages/Env/Sources/Env/CurrentAccount.swift index a1b14932..b0ec9aba 100644 --- a/Packages/Env/Sources/Env/CurrentAccount.swift +++ b/Packages/Env/Sources/Env/CurrentAccount.swift @@ -18,7 +18,7 @@ public class CurrentAccount: ObservableObject { public func setClient(client: Client) { self.client = client - + guard client.isAuth else { return } Task(priority: .userInitiated) { await fetchUserData() }