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

smol fix for process_remove_member.rs #1166

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion hydra/program/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ pub enum HydraError {
#[msg("Before you remove a wallet or NFT member please transfer the shares to another member")]
RemoveSharesMustBeZero,

#[msg("Sending Sol to a SPL token destination will render the sol unusable")]
#[msg("Sending Sol to a non-Native Account destination will render the sol unusable")]
InvalidCloseAccountDestination,
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub fn remove_member(ctx: Context<RemoveMember>) -> Result<()> {
assert_owned_by(&fanout.to_account_info(), &crate::ID)?;
assert_owned_by(&member_voucher.to_account_info(), &crate::ID)?;
update_fanout_for_remove(fanout)?;
if assert_owned_by(&ctx.accounts.member, &spl_token::id()).is_ok() {
if assert_owned_by(&ctx.accounts.destination, &anchor_lang::solana_program::system_program::id()).is_err() {
return Err(HydraError::InvalidCloseAccountDestination.into());
}
if fanout.membership_model != MembershipModel::NFT
Expand Down