Browse Source

Remove stale portal side timer bindings

main
def 6 days ago
parent
commit
7692a56458
  1. 24
      templates/portal_invoice_detail.html

24
templates/portal_invoice_detail.html

@ -307,17 +307,7 @@
{% endif %} {% endif %}
</div> </div>
{% if pending_crypto_payment and pending_crypto_payment.txid %}
<div class="snapshot-timer-box">
<div id="processingTimerSideValue" class="snapshot-timer-value" data-expiry="{{ pending_crypto_payment.processing_expires_at_iso }}">--:--</div>
<div id="processingTimerSideLabel" class="snapshot-timer-label">Watching transaction / waiting for confirmation</div>
</div>
{% else %}
<div class="snapshot-timer-box">
<div id="lockTimerSideValue" class="snapshot-timer-value" data-expiry="{{ pending_crypto_payment.lock_expires_at_iso }}">--:--</div>
<div id="lockTimerSideLabel" class="snapshot-timer-label">Quote protected while you open wallet</div>
</div>
{% endif %}
</div> </div>
</div> </div>
{% else %} {% else %}
@ -430,21 +420,11 @@
bindCountdown("lockTimerValue", "lockTimerLabel", lockTimer.dataset.expiry, "price has expired - please refresh your quote to update", "#walletPayButton"); bindCountdown("lockTimerValue", "lockTimerLabel", lockTimer.dataset.expiry, "price has expired - please refresh your quote to update", "#walletPayButton");
} }
const lockTimerSide = document.getElementById("lockTimerSideValue");
if (lockTimerSide && lockTimerSide.dataset.expiry) {
bindCountdown("lockTimerSideValue", "lockTimerSideLabel", lockTimerSide.dataset.expiry, "price has expired - please refresh your quote to update", "#walletPayButton");
}
const processingTimer = document.getElementById("processingTimerValue"); const processingTimer = document.getElementById("processingTimerValue");
if (processingTimer && processingTimer.dataset.expiry) { if (processingTimer && processingTimer.dataset.expiry) {
bindCountdown("processingTimerValue", "processingTimerLabel", processingTimer.dataset.expiry, "price has expired - please refresh your quote to update", null); bindCountdown("processingTimerValue", "processingTimerLabel", processingTimer.dataset.expiry, "price has expired - please refresh your quote to update", null);
} }
const processingTimerSide = document.getElementById("processingTimerSideValue");
if (processingTimerSide && processingTimerSide.dataset.expiry) {
bindCountdown("processingTimerSideValue", "processingTimerSideLabel", processingTimerSide.dataset.expiry, "price has expired - please refresh your quote to update", null);
}
function toHexBigIntFromDecimal(amountText, decimals) { function toHexBigIntFromDecimal(amountText, decimals) {
const text = String(amountText || "0"); const text = String(amountText || "0");
const parts = text.split("."); const parts = text.split(".");
@ -672,7 +652,7 @@ Reference: ${invoiceRef}`;
<script> <script>
(function() { (function() {
const processingAutoRefreshEnabled = {{ 'true' if pending_crypto_payment and (invoice.status or '')|lower != 'paid' else 'false' }}; const processingAutoRefreshEnabled = {{ 'true' if pending_crypto_payment and pending_crypto_payment.txid and (invoice.status or '')|lower != 'paid' else 'false' }};
if (processingAutoRefreshEnabled) { if (processingAutoRefreshEnabled) {
setTimeout(function() { setTimeout(function() {
window.location.reload(); window.location.reload();

Loading…
Cancel
Save