pub(crate) fn process_farm_creation_fee(
    config: &Config,
    info: &MessageInfo,
    params: &FarmParams,
) -> Result<Vec<CosmosMsg>, ContractError> {
// ..snip

    match paid_fee_amount.cmp(&farm_creation_fee.amount) {
// ..snip
        Ordering::Greater => {
            // if the user is paying more than the farm_creation_fee, check if it's trying to create
            // a farm with the same asset as the farm_creation_fee.
            // otherwise, refund the difference
            if farm_creation_fee.denom == params.farm_asset.denom {
                // check if the amounts add up, i.e. the fee + farm asset = paid amount. That is because the farm asset
                // and the creation fee asset are the same, all go in the info.funds of the transaction

                ensure!(
                    params
                        .farm_asset
                        .amount
                        .checked_add(farm_creation_fee.amount)?
                        == paid_fee_amount,
                    ContractError::AssetMismatch
                );
            } else {
                let refund_amount = paid_fee_amount.saturating_sub(farm_creation_fee.amount);

                messages.push(
                    BankMsg::Send {
                        to_address: info.sender.clone().into_string(),
                        amount: vec![Coin {
                            amount: refund_amount,
                            denom: farm_creation_fee.denom.clone(),
                        }],
                    }
                    .into(),
                );
            }
        }
    }

    // send farm creation fee to fee collector
    if farm_creation_fee.amount > Uint128::zero() {
        messages.push(
            BankMsg::Send {
                to_address: config.fee_collector_addr.to_string(),
                amount: vec![farm_creation_fee.to_owned()],
            }
            .into(),
        );
    }

    Ok(messages)
}
