diff --git a/contracts/stargaze-marketplace-v2/src/execute.rs b/contracts/stargaze-marketplace-v2/src/execute.rs index aef2b9b5..5d804bea 100644 --- a/contracts/stargaze-marketplace-v2/src/execute.rs +++ b/contracts/stargaze-marketplace-v2/src/execute.rs @@ -281,7 +281,7 @@ pub fn execute_set_ask( &config, &matching_bid, false, - "set-ask", + "set-ask-match", response, )?; } else if sell_now { @@ -522,6 +522,7 @@ pub fn execute_set_bid( let mut response = Response::new(); + // bid could have a match with an existing ask without the need of buy_now if let Some(ask) = matching_ask { // If a matching ask is found perform the sale funds = funds @@ -529,6 +530,11 @@ pub fn execute_set_bid( .map_err(|_| ContractError::InsufficientFunds)?; let config: Config = CONFIG.load(deps.storage)?; + + let mut action = "set-bid-match"; + if buy_now { + action = "buy-now"; + } response = finalize_sale( deps, &env, @@ -536,7 +542,7 @@ pub fn execute_set_bid( &config, &MatchingBid::Bid(bid), true, - "set-bid", + action, response, )?; } else if buy_now { diff --git a/contracts/stargaze-marketplace-v2/src/helpers.rs b/contracts/stargaze-marketplace-v2/src/helpers.rs index 3aed5650..bddd31c1 100644 --- a/contracts/stargaze-marketplace-v2/src/helpers.rs +++ b/contracts/stargaze-marketplace-v2/src/helpers.rs @@ -207,7 +207,7 @@ pub fn finalize_sale( .add_attribute("seller_recipient", seller_recipient.to_string()) .add_attribute("nft_recipient", nft_recipient.to_string()) .add_attribute("ask", ask.id.to_string()) - .add_attribute("action", action.to_string()); + .add_attribute("marketplace_action", action.to_string()); match &matching_bid { MatchingBid::Bid(bid) => {