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

Native sol #410

Open
wants to merge 6 commits into
base: upgrade
Choose a base branch
from
Open

Conversation

composable-kvn
Copy link

No description provided.

Comment on lines 406 to 421
let solver = accounts.solver.clone();

let ix = solana_program::system_instruction::transfer(
&accounts.auctioneer_state.key(),
solver.key,
amount_out,
);

invoke(
&ix,
&[
accounts.auctioneer_state.to_account_info(),
solver.to_account_info(),
accounts.system_program.to_account_info(),
],
)?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be reverted since auctioneer state is a PDA and not owned by the system program. The previous code would work since the aucitoneer_state is owner by the current program.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, I forgot to use invoke_signed when I need to debit PDA.
I will change it to borrow_mut and +/- operations.

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