Skip to content

Native sol#410

Open
composable-kvn wants to merge 6 commits intoComposableFi:upgradefrom
composable-kvn:native-sol
Open

Native sol#410
composable-kvn wants to merge 6 commits intoComposableFi:upgradefrom
composable-kvn:native-sol

Conversation

@composable-kvn
Copy link
Copy Markdown

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
Copy Markdown
Contributor

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
Copy Markdown
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