Skip to content

Commit

Permalink
fix airdrop in different denom
Browse files Browse the repository at this point in the history
  • Loading branch information
jhernandezb committed Oct 11, 2023
1 parent e2cb431 commit 713268b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions contracts/minters/vending-minter-wl-flex/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ fn _execute_mint(

let mint_price: Coin = mint_price(deps.as_ref(), is_admin)?;
// Exact payment only accepted
let payment = may_pay(&info, &config.mint_price.denom)?;
let payment = may_pay(&info, &mint_price.denom)?;
if payment != mint_price.amount {
return Err(ContractError::IncorrectPaymentAmount(
coin(payment.u128(), &config.mint_price.denom),
Expand Down Expand Up @@ -1009,7 +1009,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.amount.u128(),
config.mint_price.denom,
factory_params.extension.airdrop_mint_price.denom,
));
}

Expand Down
4 changes: 2 additions & 2 deletions contracts/minters/vending-minter/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ fn _execute_mint(

let mint_price: Coin = mint_price(deps.as_ref(), is_admin)?;
// Exact payment only accepted
let payment = may_pay(&info, &config.mint_price.denom)?;
let payment = may_pay(&info, &mint_price.denom)?;
if payment != mint_price.amount {
return Err(ContractError::IncorrectPaymentAmount(
coin(payment.u128(), &config.mint_price.denom),
Expand Down Expand Up @@ -1045,7 +1045,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.amount.u128(),
config.mint_price.denom,
factory_params.extension.airdrop_mint_price.denom,
));
}

Expand Down

0 comments on commit 713268b

Please sign in to comment.