-
Notifications
You must be signed in to change notification settings - Fork 7
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
base: upgrade
Are you sure you want to change the base?
Native sol #410
Conversation
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(), | ||
], | ||
)?; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
No description provided.