Skip to content

Commit

Permalink
fix(launchpad): fix multitest, remove unused error
Browse files Browse the repository at this point in the history
  • Loading branch information
WaDadidou committed Nov 4, 2024
1 parent 21c4ff0 commit 4389e54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
3 changes: 0 additions & 3 deletions rust/cw-contracts/nft-launchpad/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ pub enum ContractError {
#[error("Merkle root missing.")]
MerkleRootMissing,

#[error("Admin missing.")]
AdminMissing,

#[error("Unauthorized.")]
Unauthorized,

Expand Down
15 changes: 3 additions & 12 deletions rust/cw-contracts/nft-launchpad/src/multitest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand All @@ -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)
Expand Down Expand Up @@ -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!(
Expand Down

0 comments on commit 4389e54

Please sign in to comment.