update: .......
This commit is contained in:
@@ -281,27 +281,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
function syncTxids(data) {
|
||||
if (!data?.txs) return;
|
||||
for (const tx of data.txs) {
|
||||
if (tx.txid && !watchedTxids.includes(tx.txid)) watchedTxids.push(tx.txid);
|
||||
}
|
||||
}
|
||||
|
||||
function applyStatus(status, data) {
|
||||
if (status === 'underpaid') {
|
||||
document.getElementById('pay-status').innerHTML = `
|
||||
<span class="w-2 h-2 rounded-full bg-yellow-500 animate-pulse"></span>
|
||||
<span class="text-yellow-400">Underpaid — please send the remaining amount</span>
|
||||
`;
|
||||
if (data?.txid) {
|
||||
for (const t of data.txid.split(',')) {
|
||||
if (!watchedTxids.includes(t)) watchedTxids.push(t);
|
||||
}
|
||||
}
|
||||
syncTxids(data);
|
||||
} else if (status === 'confirming') {
|
||||
document.getElementById('pay-status').innerHTML = `
|
||||
<span class="w-2 h-2 rounded-full bg-blue-500 animate-pulse"></span>
|
||||
<span class="text-blue-400">Transaction detected, waiting for confirmation...</span>
|
||||
`;
|
||||
if (data?.txid) {
|
||||
for (const t of data.txid.split(',')) {
|
||||
if (!watchedTxids.includes(t)) watchedTxids.push(t);
|
||||
}
|
||||
}
|
||||
syncTxids(data);
|
||||
} else if (status === 'paid') {
|
||||
clearInterval(pollInterval);
|
||||
clearInterval(countdownInterval);
|
||||
|
||||
Reference in New Issue
Block a user