Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #2305 #2338

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
{% endif %}
<div class="px-3 pb-4">
<p class="text-center text-sm m-4" id="total_supply"></p>
{% if verificationprogress >= 100 %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  File "/Users/kim/src/specter-desktop/src/cryptoadvance/specter/templates/includes/sidebar/components/node_connection.jinja", line 12, in top-level template code
    <div class="hidden" id="node-info-popup">{% include node.node_info_template() %}</div>
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kim/src/specter-desktop/src/cryptoadvance/specter/templates/node/components/bitcoin_core_info.jinja", line 42, in top-level template code
    {% if verificationprogress >= 100 %}
    ^^^^^^^^^^^^^^^^^^^^^^^^^
jinja2.exceptions.UndefinedError: 'verificationprogress' is undefined

That's what the tests are complaining about. Why do you think it's defined?

<div onclick="fetchTotalSupply()" class="button mb-3">
{{ _("Run the numbers") }}
<tool-tip>
Expand All @@ -47,6 +48,7 @@
</span>
</tool-tip>
</div>
{% endif %}
{% if current_user.is_admin %}
<div class="button mb-0">
<a id="active-node-settings-btn" href="{{ url_for('nodes_endpoint.node_settings', node_alias=specter.node.alias) }}">
Expand All @@ -62,6 +64,10 @@
<script>
let totalUserBalance = parseFloat(parseFloat("{{ specter.wallet_manager.wallets.values() | sum(attribute='fullbalance') }}").toFixed(8));
async function fetchTotalSupply() {
if (verificationprogress < 100) {
document.getElementById('total_supply').innerText = `{{ _("Syncing in progress .... please wait till sync finishes") }}`;
return
}
document.getElementById('total_supply').innerText = `{{ _("Calculating ... (this might take a few minutes)") }}`;
try {
const response = await fetch(
Expand Down
Loading