{% from 'wallet/history/components/tx_item.jinja' import tx_item %}

{# 
    account_utxo_table - List of transactions hisory of an account (address/ label)
    Parameters:
    - account: The address/ label to make the table for.
    - group_by: Either 'address' (when `account` is an address) or 'label' (when `account` is a label, which may include multiple addresses)
    - wallet: Wallet object
    - specter: Specter object
 #}
{% macro account_utxo_table(account, group_by, wallet, specter) -%}
        {% for tx in wallet.utxo if
            tx["address"] == account or (not group_by == 'address' and wallet.utxo_labels_list[tx["address"]] == account)
        %}
            {{ tx_item(tx=tx, wallet=wallet, specter=specter, includeValidatedBlockhash=False) }}
        {% endfor %}
{%- endmacro %}
