Skip to content

Commit

Permalink
no need to assert mint rule when purging keys
Browse files Browse the repository at this point in the history
  • Loading branch information
larry0x committed Sep 13, 2022
1 parent 788dd40 commit ab4da37
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions contracts/hub/src/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,6 @@ pub fn purge_keys(
) -> Result<Response, ContractError> {
let badge = BADGES.load(deps.storage, id)?;

// the badge must be of "by keys" minting rule
match &badge.rule {
MintRule::ByKeys => (),
rule => return Err(ContractError::wrong_mint_rule("by_keys", rule)),
}

// can only purge keys once the badge becomes unavailable to be minted
assert_unavailable(&badge, &env.block)?;

Expand Down

0 comments on commit ab4da37

Please sign in to comment.