Skip to content

Commit

Permalink
fix: create the lp_denom variable earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
nseguias committed Sep 25, 2024
1 parent a097de0 commit 0ff50ad
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions contracts/injective-auction-pool/src/executions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,12 @@ pub(crate) fn join_pool(

// mint the lp token and send it to the user
let mut messages = vec![];
let lp_subdenom = unsettled_auction.lp_subdenom;
let lp_denom =
format!("factory/{}/auction.{}", env.contract.address, unsettled_auction.lp_subdenom);

messages.push(config.token_factory_type.mint(
env.contract.address.clone(),
format!("factory/{}/auction.{}", env.contract.address.clone(), lp_subdenom).as_str(),
amount,
));
messages.push(config.token_factory_type.mint(env.contract.address.clone(), &lp_denom, amount));

// send the minted lp token to the user address
let lp_denom = format!("factory/{}/auction.{}", env.contract.address, lp_subdenom);
messages.push(
BankMsg::Send {
to_address: info.sender.to_string(),
Expand Down

0 comments on commit 0ff50ad

Please sign in to comment.