Skip to content

Commit

Permalink
cargo lint
Browse files Browse the repository at this point in the history
  • Loading branch information
humanalgorithm committed Jul 4, 2023
1 parent 1e98599 commit 05f42fc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
3 changes: 2 additions & 1 deletion contracts/factories/base-factory/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ pub fn update_params<T, C>(
}

if let Some(min_mint_price) = param_msg.min_mint_price {
//TODO BURNTOMINT
match min_mint_price.clone() {
sg2::Token::Fungible(mint_price) => {
ensure_eq!(
Expand All @@ -159,7 +160,7 @@ pub fn update_params<T, C>(
ContractError::InvalidDenom {}
);
}
sg2::Token::NonFungible(collection) => {
sg2::Token::NonFungible(_) => {
// TODO: make sure we can query the collection
// perform a query on the collection so we know its the right type
}
Expand Down
1 change: 0 additions & 1 deletion contracts/factories/vending-factory/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use cw2::set_contract_version;
use cw_utils::must_pay;
use sg1::checked_fair_burn;
use sg2::query::{AllowedCollectionCodeIdResponse, AllowedCollectionCodeIdsResponse, Sg2QueryMsg};
use sg2::Token;
use sg_std::{Response, NATIVE_DENOM};

use crate::error::ContractError;
Expand Down
8 changes: 4 additions & 4 deletions contracts/minters/open-edition-minter/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#[cfg(not(feature = "library"))]
use cosmwasm_std::entry_point;
use cosmwasm_std::{
coin, ensure, to_binary, Addr, BankMsg, Binary, Coin, Deps, DepsMut, Empty, Env, MessageInfo,
Order, Reply, ReplyOn, StdError, StdResult, Timestamp, WasmMsg,
coin, to_binary, Addr, BankMsg, Binary, Coin, Deps, DepsMut, Empty, Env, MessageInfo, Order,
Reply, ReplyOn, StdError, StdResult, Timestamp, WasmMsg,
};
use cw2::set_contract_version;
use cw_utils::{may_pay, maybe_addr, nonpayable, parse_reply_instantiate_data};
Expand Down Expand Up @@ -410,9 +410,9 @@ pub fn execute_update_mint_price(
let config_mint_price = config.mint_price.clone().amount()?.u128();

// If current time is after the stored start_time, only allow lowering price
if env.block.time >= config.extension.start_time && price >= config_mint_price.clone() {
if env.block.time >= config.extension.start_time && price >= config_mint_price {
return Err(ContractError::UpdatedMintPriceTooHigh {
allowed: config_mint_price.clone(),
allowed: config_mint_price,
updated: price,
});
}
Expand Down
9 changes: 2 additions & 7 deletions contracts/minters/vending-minter/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ pub fn execute_update_discount_price(
.denom()
.map_err(|_| ContractError::IncorrectFungibility {})?;

config.extension.discount_price = Some(coin(price, config_denom.clone()));
config.extension.discount_price = Some(coin(price, config_denom));
CONFIG.save(deps.storage, &config)?;

Ok(Response::new()
Expand Down Expand Up @@ -1055,12 +1055,7 @@ pub fn mint_price(deps: Deps, is_admin: bool) -> Result<Coin, StdError> {

if is_admin {
return Ok(coin(
factory_params
.extension
.airdrop_mint_price
.clone()
.amount
.u128(),
factory_params.extension.airdrop_mint_price.amount.u128(),
config_denom,
));
}
Expand Down

0 comments on commit 05f42fc

Please sign in to comment.