From c3cf78c331abaed652418e7924e22f4c779fed52 Mon Sep 17 00:00:00 2001 From: Tanmay Munjal Date: Sun, 2 Jul 2023 23:49:58 +0530 Subject: [PATCH 1/2] added .anchor and dev.json to .gitignore --- .gitignore | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c4f6b3e..081954d 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,10 @@ Cargo.lock *.pdb .next .vercel -node_module \ No newline at end of file +node_module + +#ignore .anchor folder +.anchor/* + +#adding dev keypair in gitignore +dev.json \ No newline at end of file From 85018d9f0c8ddadd318becb9a13cd713758503ea Mon Sep 17 00:00:00 2001 From: Tanmay Munjal Date: Mon, 3 Jul 2023 00:12:42 +0530 Subject: [PATCH 2/2] removed creator must be system account constraint --- .gitignore | 5 ++++- programs/shadow-nft-standard/src/error.rs | 3 --- .../shadow-nft-standard/src/instructions/create_group.rs | 8 -------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 081954d..8baff38 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,7 @@ node_module .anchor/* #adding dev keypair in gitignore -dev.json \ No newline at end of file +dev.json + +#adding test ledger folder to gitignore +test-ledger/* \ No newline at end of file diff --git a/programs/shadow-nft-standard/src/error.rs b/programs/shadow-nft-standard/src/error.rs index 2420fd3..2e61d46 100644 --- a/programs/shadow-nft-standard/src/error.rs +++ b/programs/shadow-nft-standard/src/error.rs @@ -29,9 +29,6 @@ pub enum ErrorCode { #[msg("Attempted to create a group which exceeds the maximum number of members")] ExceedsMaxGroupSize, - #[msg("A creator must be a system account")] - CreatorMustBeSystemAccount, - #[msg("A creator was not present for a multisig operation")] CreatorNotPresentForMultisig, diff --git a/programs/shadow-nft-standard/src/instructions/create_group.rs b/programs/shadow-nft-standard/src/instructions/create_group.rs index e064b20..3cbfb96 100644 --- a/programs/shadow-nft-standard/src/instructions/create_group.rs +++ b/programs/shadow-nft-standard/src/instructions/create_group.rs @@ -15,14 +15,6 @@ use crate::{ /// before initializing the `CreatorGroup` value. This should be done regardless /// of `multisig`. pub fn handle_create_group(ctx: Context, args: CreateGroupArgs) -> Result<()> { - // Check that remaining accounts are all system accounts - for account in ctx.remaining_accounts { - if *account.owner != System::id() { - verbose_msg!("A non-SystemAccount was passed in as a creator"); - return Err(ErrorCode::CreatorMustBeSystemAccount.into()); - } - } - // Gather signing creator let mut creators = Vec::with_capacity(1 + ctx.remaining_accounts.len()); creators.push(ctx.accounts.creator.key());