Skip to content

Commit

Permalink
ts-sdk: fix switchActiveUser undefined arg (#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
wphan authored Oct 15, 2023
1 parent f3dd48e commit 0ca7237
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/src/driftClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0ca7237

Please sign in to comment.