
{# 
    total_wallet_balances - Title showing the wallet total balance + amount confirmed and unconfirmed (if there is any unconfirmed amount).
    Parameters:
    - wallet: Wallet object
    - specter: Specter object
 #}
{% macro total_wallet_balances(wallet, specter) -%}
    <h1>
        <small style="line-height:30px">Total balance:</small><br>
        <span style="color: #fff">
            <span id="fullbalance_amount">{{ wallet.fullbalance | btcunitamount }}</span>
            {% if specter.unit == 'sat' %}
				sats
			{% else %}
				{% if specter.chain !='main' %}t{%endif%}BTC
			{% endif %}
        </span><br>
        <span class="note">{{ wallet.fullbalance | altunit }}</span>
        {% if wallet.balance["untrusted_pending"] > 0 %}<br>
            <small>( {{ wallet.balance["trusted"] | btcunitamount }} confirmed, {{ wallet.balance["untrusted_pending"] | btcunitamount }} pending )</small>
        {% endif %}
    </h1>
    {% if wallet.rescan_progress or specter.utxorescanwallet == wallet.alias %}
        <span id="wallet_rescan_data" style="display: contents;">
            <h2>Rescanning blockchain: <span id="{{ wallet.alias }}_balances_wallet_rescan_percents">{{ "%.2f"|format(specter.info["utxorescan"] if specter.utxorescanwallet == wallet.alias else wallet.rescan_progress * 100) }}</span>%</h2>
            <span class="warning">
                <img src="{{ url_for('static', filename='img/info_sign.svg') }}" style="width: 20px;"/><br>
                Total balance and transactions history may show outdated data during scanning.<br>Please wait until the scanning is complete before you start using the wallet.
            </span>
        </span>
    {% endif %}
{%- endmacro %}
