drift-labs / protocol-v2

On-chain perpetuals dex with multiple liquidity mechanisms
Apache License 2.0
206 stars 111 forks source link

driftClient will sub to user stats in switchActiveUser even if its not enabled in config #1281

Closed crispheaney closed 4 hours ago

crispheaney commented 4 hours ago

Drift client has option to subscribe for userStats, which is turned off by default But method driftClient.switchActiveUser creates userStats subscription regardless of this settings whenever client authority is changed

https://github.com/drift-labs/protocol-v2/blob/master/sdk/src/driftClient.ts#L835

crispheaney commented 4 hours ago

https://github.com/drift-labs/protocol-v2/pull/1282/files