diff --git a/sdk/src/driftClient.ts b/sdk/src/driftClient.ts index 22eefbe7e..80fc73c47 100644 --- a/sdk/src/driftClient.ts +++ b/sdk/src/driftClient.ts @@ -589,7 +589,7 @@ export class DriftClient { } public async switchActiveUser(subAccountId: number, authority?: PublicKey) { - const authorityChanged = !this.authority?.equals(authority); + const authorityChanged = authority && !this.authority?.equals(authority); this.activeSubAccountId = subAccountId; this.authority = authority ?? this.authority;