{% extends "base.jinja" %}
{% block main %}
    <style>
		.arrow {
			text-decoration: none;
			display: inline-block;
			margin: 0px 16px 16px;
			border-radius: 50%;
			color: #fff;
			font-size: 1.5em;
		}

		.disabled {
			visibility: hidden;
		}
	</style>
	{% include "includes/address-label.html" %}
    <h1 id="title">Wallets Overview</h1>
	<p style="width: 80%; text-align: center; margin-left: auto; margin-right: auto;">Here you can see the combined balance and transactions history of all your Specter wallets.</p>
    <h1>
        <small style="line-height:30px">Total balance:</small><br>
        <span style="color: #fff">
			{% set fullbalance = specter.wallet_manager.wallets.values() | sum(attribute='fullbalance') %}
            <span id="fullbalance_amount">{{ fullbalance | btcunitamount }}</span>
            {% if specter.unit == 'sat' %}
				sats
			{% else %}
				{% if specter.chain !='main' %}t{%endif%}BTC
			{% endif %}
        </span><br>
		<span class="note">{{ fullbalance | altunit }}</span>
        {% if specter.wallet_manager.wallets.values() | sum(attribute='balance.untrusted_pending') > 0 %}<br>
            <small>( {{ specter.wallet_manager.wallets.values() | sum(attribute='balance.trusted') | btcunitamount }} confirmed, {{ specter.wallet_manager.wallets.values() | sum(attribute='balance.untrusted_pending') | btcunitamount }} pending )</small>
        {% endif %}
    </h1>
    <div class="table-holder">
        {% include "includes/tx-row.html" %}
		{% include "includes/tx-data.html" %}
		{% include "includes/explorer-link.html" %}
		{% include "includes/tx-table.html" %}
		<tx-table
		{% if specter.price_check and (specter.alt_rate and specter.alt_symbol) %}
		price="{{ specter.alt_rate }}"
		symbol="{{ specter.alt_symbol }}"
		{% endif %}
		btc-unit="{{ specter.unit }}"
		type="txlist">
		</tx-table>
    </div>
    <div id="tx-popup" class="hidden"></div>
{% endblock %}
