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 method to forcefully include market accounts with TransactionBuilder #39

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

jordy25519
Copy link
Collaborator

closes #38

motivation:
drift needs to read/write market accounts for open positions/orders e.g. for margin checks.
currently, a tx is built with the market accounts using synced User data but there can be race conditions and so the constructed tx is missing necessary accounts vs. onchain when it is broadcast.

this PR allows to force some market accounts to be included when building a tx, which can allow the tx to land successfully (when it otherwise wouldn't have- due to the sync issues)
replicates similar behaviour in the Ts sdk.

@jordy25519 jordy25519 merged commit 1adafcb into main Oct 4, 2024
1 check passed
@jordy25519 jordy25519 deleted the fix/38-again branch October 4, 2024 03:43
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.

Getting Anchor error PerpMarketNotFound, when trying to modify order on PERP market
1 participant