{% 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/services-data.html" %}
    {% 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>
    {% from 'wallet/history/components/total_wallet_balances.jinja' import total_wallet_balances %}
    {% set amount_total = specter.wallet_manager.wallets.values() | sum(attribute='amount_total') %}
    {% set amount_confirmed = specter.wallet_manager.wallets.values() | sum(attribute='amount_confirmed') %}
    {% set amount_unconfirmed = specter.wallet_manager.wallets.values() | sum(attribute='amount_unconfirmed') %}
    {% set amount_immature = specter.wallet_manager.wallets.values() | sum(attribute='amount_immature') %}
    {% set balance = specter.wallet_manager.joined_balance() %}
    {% set rescan_progress = specter.wallet_manager.wallets.values() | average_of_attribute(attribute='rescan_progress')   %}
    {{ total_wallet_balances(
        _("Combined Wallet Balances"),
        amount_total, 
        amount_confirmed,
        amount_unconfirmed, 
        amount_immature, 
        balance, 
        rescan_progress, 
        "", 
        specter) }}
    <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 }}"
            hide-sensitive-info="{{ specter.hide_sensitive_info | lower }}"
            type="txlist"
            scrollbar-default="on"
            table-border-radius="0px">
        </tx-table>
    </div>
    <div id="tx-popup" class="hidden"></div>
{% endblock %}
