Skip to content

Commit

Permalink
remove unnecesary check
Browse files Browse the repository at this point in the history
  • Loading branch information
humanalgorithm committed Aug 27, 2023
1 parent 79c425b commit f9557f5
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions contracts/minters/base-minter/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,24 +127,10 @@ pub fn burn_and_mint(
) -> Result<Response, ContractError> {
let res = burn_to_mint::generate_burn_msg(info.clone(), msg.clone())?;
let token_uri_msg: TokenUriMsg = from_binary(&msg.msg)?;
let mint_res = _execute_mint_sender(deps, info, token_uri_msg.token_uri)?;
let mint_res = execute_mint_sender(deps, info, token_uri_msg.token_uri)?;
Ok(mint_res.add_submessages(res.messages))
}

pub fn execute_mint_sender(
deps: DepsMut,
info: MessageInfo,
token_uri: String,
) -> Result<Response, ContractError> {
let config = CONFIG.load(deps.storage)?;

if matches!(config.mint_price, Token::NonFungible(_)) {
return Err(ContractError::InvalidMintPrice {});
}

_execute_mint_sender(deps, info, token_uri)
}

fn pay_mint_if_not_burn_collection(
info: MessageInfo,
mint_price: Token,
Expand Down Expand Up @@ -173,7 +159,7 @@ fn pay_mint_if_not_burn_collection(
}
}

fn _execute_mint_sender(
fn execute_mint_sender(
deps: DepsMut,
info: MessageInfo,
token_uri: String,
Expand Down

0 comments on commit f9557f5

Please sign in to comment.