Enhance pool fees percentage display logic

Updated conditional checks in `dashboard.html` to ensure
`metrics.pool_fees_percentage` is not `none` before display.
Added validation for percentage range (0.9 to 1.3) to show
star icon and "DATUM" label, improving data accuracy and
presentation.
This commit is contained in:
DJObleezy 2025-04-22 06:22:59 -07:00
parent ce3b186dc5
commit b8321fe3b0

View File

@ -94,9 +94,9 @@
<p> <p>
<strong>Pool Fees:</strong> <strong>Pool Fees:</strong>
<span id="pool_fees_percentage" class="metric-value"> <span id="pool_fees_percentage" class="metric-value">
{% if metrics and metrics.pool_fees_percentage is defined %} {% if metrics and metrics.pool_fees_percentage is defined and metrics.pool_fees_percentage is not none %}
{{ metrics.pool_fees_percentage }}% {{ metrics.pool_fees_percentage }}%
{% if metrics.pool_fees_percentage >= 0.9 and metrics.pool_fees_percentage <= 1.3 %} {% if metrics.pool_fees_percentage is not none and metrics.pool_fees_percentage >= 0.9 and metrics.pool_fees_percentage <= 1.3 %}
<span class="fee-star"></span> <span class="datum-label">DATUM</span> <span class="fee-star"></span> <span class="datum-label">DATUM</span>
{% endif %} {% endif %}
{% else %} {% else %}