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

deposit_into_spot_market_revenue_pool #520

Merged
merged 10 commits into from
Aug 1, 2023

Conversation

0xbigz
Copy link
Member

@0xbigz 0xbigz commented Jul 3, 2023

No description provided.

tests/spotSwap.ts Show resolved Hide resolved
@@ -1940,6 +1973,29 @@ pub struct Deposit<'info> {
pub token_program: Program<'info, Token>,
}

#[derive(Accounts)]
#[instruction(market_index: u16,)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is wrong i think, as is it it would use the amount as the market_index, im surprised the ts test passed

i'd get wrong of the market index here and just pull it from the spot market using
spot_market.load()?.market_index

amount,
)?;

spot_market.validate_max_token_deposits()?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would validate vault amounts too

@crispheaney crispheaney merged commit ad53944 into master Aug 1, 2023
8 of 9 checks passed
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.

None yet

2 participants