forked from bitcoinafterlife/bal-welist-website
fix: add missing statusMap definition and iv-balance reset
This commit is contained in:
13
index.html
13
index.html
@@ -383,6 +383,18 @@ let minAmount = 50000;
|
||||
const fmt = n => (n != null ? Number(n).toLocaleString('en-US') : '—');
|
||||
const trunc = (s, m=40) => s && s.length > m ? s.slice(0, m) + '…' : s;
|
||||
|
||||
const statusMap = {
|
||||
'OK': 'Health check passed',
|
||||
'TIMEOUT': 'Connection timeout',
|
||||
'CONNECTION': 'Connection error',
|
||||
'STATUS': 'HTTP error',
|
||||
'WRONG REPLY': 'Invalid JSON response',
|
||||
'REQUEST': 'Request error',
|
||||
'BODY': 'Body read error',
|
||||
'DECODE': 'Decode error',
|
||||
'KO': 'Generic error'
|
||||
};
|
||||
|
||||
function getChain() {
|
||||
const btn = document.querySelector('#chainSeg [aria-pressed="true"]');
|
||||
return btn ? btn.dataset.c : 'bitcoin';
|
||||
@@ -508,6 +520,7 @@ document.getElementById('submit').addEventListener('click', async () => {
|
||||
document.getElementById('iv-min').textContent = '—';
|
||||
document.getElementById('iv-chain').textContent = '—';
|
||||
document.getElementById('iv-addr').textContent = '—';
|
||||
document.getElementById('iv-balance').textContent = '—';
|
||||
document.getElementById('iv-url').textContent = '—';
|
||||
document.getElementById('iv-contact').textContent = '—';
|
||||
document.getElementById('iv-weinfo').href = '#';
|
||||
|
||||
Reference in New Issue
Block a user