From 975e22d706e9c7b91f3c578a97672bbd8230800b Mon Sep 17 00:00:00 2001 From: WaDadidou Date: Mon, 4 Nov 2024 13:53:18 -0500 Subject: [PATCH] fix(launchpad): fix multitest, remove unused error --- rust/cw-contracts/nft-launchpad/src/error.rs | 3 --- rust/cw-contracts/nft-launchpad/src/multitest.rs | 15 +++------------ 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/rust/cw-contracts/nft-launchpad/src/error.rs b/rust/cw-contracts/nft-launchpad/src/error.rs index 1536f82f1..faefb38ee 100644 --- a/rust/cw-contracts/nft-launchpad/src/error.rs +++ b/rust/cw-contracts/nft-launchpad/src/error.rs @@ -13,9 +13,6 @@ pub enum ContractError { #[error("Merkle root missing.")] MerkleRootMissing, - #[error("Admin missing.")] - AdminMissing, - #[error("Unauthorized.")] Unauthorized, diff --git a/rust/cw-contracts/nft-launchpad/src/multitest.rs b/rust/cw-contracts/nft-launchpad/src/multitest.rs index 886230f16..9dcaa25d9 100644 --- a/rust/cw-contracts/nft-launchpad/src/multitest.rs +++ b/rust/cw-contracts/nft-launchpad/src/multitest.rs @@ -188,15 +188,6 @@ fn full_flow() { assert_eq!(err, ContractError::CollectionSymbolExists); } - // Deploy when deployer missing --------------------------------------------------------- - { - let err = contract - .deploy_collection("SYMBOL_NOT_EXIST".to_string()) - .call(sender) - .unwrap_err(); - assert_eq!(err, ContractError::AdminMissing) - } - // Update config when sender is not contract owner { let err = contract @@ -212,7 +203,7 @@ fn full_flow() { assert_eq!(err, ContractError::Unauthorized) } - // Deploy when sender is not deployer --------------------------------------------------------- + // Deploy when sender is not launchpad_admin --------------------------------------------------------- { contract .update_config(ConfigChanges { @@ -239,7 +230,7 @@ fn full_flow() { name: "test".to_string(), supported_networks: vec![], nft_code_id: None, - launchpad_admin: Some(admin.to_string()), + launchpad_admin: Some(sender.to_string()), owner: Some(sender.to_string()), }) .call(sender) @@ -319,7 +310,7 @@ fn full_flow() { let collection_id = "SYMBOL".to_string(); let resp = contract .deploy_collection(collection_id.to_owned()) - .call(sender) + .call(admin) .unwrap(); let attrs = resp.custom_attrs(1); assert_eq!(