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

donate to reserve function #194

Merged
merged 8 commits into from
Oct 18, 2024
Merged

donate to reserve function #194

merged 8 commits into from
Oct 18, 2024

Conversation

nope-finance
Copy link
Member

No description provided.

msg!("Reserve liquidity supply does not match the reserve liquidity supply provided");
return Err(LendingError::InvalidAccountInput.into());
}

Choose a reason for hiding this comment

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

typically we also check this, but i don't think it's strictly necessary:

 if &reserve.liquidity.supply_pubkey == source_liquidity_info.key {
        msg!("Reserve liquidity supply cannot be used as the source liquidity provided");
        return Err(LendingError::InvalidAccountInput.into());
    }

if lending_market_info.owner != program_id {
msg!("Lending market provided is not owned by the lending program");
return Err(LendingError::InvalidAccountOwner.into());
}

Choose a reason for hiding this comment

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

missing reserve whitelist

@nope-finance nope-finance force-pushed the donate_to_reserve branch 2 times, most recently from 869d856 to d664321 Compare October 16, 2024 20:31
@nope-finance nope-finance merged commit 9ffd16d into upcoming Oct 18, 2024
6 checks passed
@nope-finance nope-finance deleted the donate_to_reserve branch October 18, 2024 08:59
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.

2 participants