def make_checkout_web3modal_url(
    currency_type, amount_in_ether_or_token, wallet_address, chainId=1
):
    """
    Build a checkout.web3modal.com link that uses web3modal
    to create a tx to pay in ETH/DAI on a chain to a certain address.
    Note: amount_in_ether_or_token is in decimals.
    """
    if currency_type not in {"ETH", "DAI"}:
        raise ValueError("currency_type should be either ETH or DAI")

    return f"https://checkout.web3modal.com/?currency={currency_type}&amount={amount_in_ether_or_token}&to={wallet_address}&chainId={chainId}"