Skip to content

Commit

Permalink
frank/revert user stats change (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
soundsonacid authored Mar 1, 2024
1 parent f19bcb5 commit 5aa2a79
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,12 @@ impl<T: AccountProvider> DriftClient<T> {
self.backend.get_account(&user_pubkey).await
}

/// Get user stats account of current wallet
/// Get a stats account
///
/// Returns the deserialized account data (`UserStats`)
pub async fn get_user_stats(&self) -> SdkResult<UserStats> {
self.backend.get_account(&self.wallet.stats).await
pub async fn get_user_stats(&self, authority: &Pubkey) -> SdkResult<UserStats> {
let user_stats_pubkey = Wallet::derive_stats_account(authority, &constants::PROGRAM_ID);
self.backend.get_account(&user_stats_pubkey).await
}

/// Get the latest recent_block_hash
Expand Down

0 comments on commit 5aa2a79

Please sign in to comment.