Fix donations field: use singular donation from backend

This commit is contained in:
2026-07-16 13:36:05 -04:00
parent 0298ec737e
commit a8d1c5b214
2 changed files with 2 additions and 2 deletions

View File

@@ -579,7 +579,7 @@ document.getElementById('terms-accept').addEventListener('click', async function
const balStr = result.balance != null ? fmt(result.balance) : null;
const uncStr = result.unconfirmed_balance != null ? fmt(result.unconfirmed_balance) : null;
document.getElementById('iv-balance').textContent = balStr ? (uncStr ? balStr + ' (' + uncStr + ')' : balStr) : '—';
document.getElementById('iv-donations').textContent = result.donations != null ? fmt(result.donations) : '—';
document.getElementById('iv-donations').textContent = result.donation != null ? fmt(result.donation) : '—';
document.getElementById('iv-contact').textContent = document.getElementById('contact').value.trim() || '—';
const weLink = result.id ? `/weinfo/${result.chain || chain}/${result.id}` : null;
const weinfoEl = document.getElementById('iv-weinfo');

View File

@@ -94,7 +94,7 @@
const bal = data.balance != null ? data.balance : null;
const unc = data.unconfirmed_balance != null ? data.unconfirmed_balance : null;
document.getElementById('webalance').innerHTML = bal ? (unc ? bal + ' (' + unc + ')' : bal) : '—';
document.getElementById('wedonations').innerHTML = data.donations != null ? data.donations : '—';
document.getElementById('wedonations').innerHTML = data.donation != null ? data.donation : '—';
document.getElementById('weversion').innerHTML = data.version||'—';
document.getElementById('weexpiry').innerHTML = '<b>' + (data.expiry_date || '—') + '</b>';
document.getElementById('weupdate').innerHTML = data.last_update || '—';