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 8 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/apply-version-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:

env:
NODE_VERSION: 17.0.1
ANCHOR_VERSION: 0.26.0
ANCHOR_VERSION: 0.27.0
SOLANA_VERSION_STABLE: 1.14.13
RUST_TOOLCHAIN: stable

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-on-pr-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:

env:
NODE_VERSION: 17.0.1
ANCHOR_VERSION: 0.26.0
ANCHOR_VERSION: 0.27.0
SOLANA_VERSION_STABLE: 1.14.13
RUST_TOOLCHAIN: stable

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify-lib-on-pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:

env:
NODE_VERSION: 17.0.1
ANCHOR_VERSION: 0.26.0
ANCHOR_VERSION: 0.27.0
SOLANA_VERSION_STABLE: 1.14.13
RUST_TOOLCHAIN: stable

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,4 @@ under either the [MIT][mit-license] or the [Apache][apache-license] licenses.
[apache-license]: https://www.apache.org/licenses/LICENSE-2.0.txt

[mit-license]: https://www.mit.edu/~amini/LICENSE.md

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,12 @@ 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
Loading