Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing accounts for place make/take #5

Merged
merged 4 commits into from
Mar 1, 2024
Merged

add missing accounts for place make/take #5

merged 4 commits into from
Mar 1, 2024

Conversation

jordy25519
Copy link
Collaborator

@jordy25519 jordy25519 commented Feb 27, 2024

Fixes:

  • missing accounts for place_and_make/take
  • liquidation price matches UI (handle LP shares and open orders)
  • unrealized PnL matches UI (don't include settled pnl)

Changes

  • bumped drift-program to v2.66.0
  • tidied this function to use the wallet
 pub async fn get_user_stats(&self) -> SdkResult<UserStats> {
        self.backend.get_account(&self.wallet.stats).await
    }

integration tests busted on devnet

fix liquidaiton price for user with lp shares
fix unrealized pnl calc to exclude settled amounts
@jordy25519 jordy25519 merged commit f19bcb5 into main Mar 1, 2024
1 check failed
@jordy25519 jordy25519 deleted the feat/pmt branch March 1, 2024 04:45
@github-actions github-actions bot mentioned this pull request Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant