diff --git a/src/assets/monitoring-btc.js b/src/assets/monitoring-btc.js index 66d0e5d47..f1f1d473f 100644 --- a/src/assets/monitoring-btc.js +++ b/src/assets/monitoring-btc.js @@ -16,6 +16,12 @@ function satsToBtc(sats) { return (sats || 0) / 100000000; } +var EVM_WALLET = '0xDDA7efc856833960694cb26cb583e0CCCA497b87'; +var EXPLORERS = { + ethereum: 'https://etherscan.io/address/' + EVM_WALLET, + citrea: 'https://citreascan.com/address/' + EVM_WALLET, +}; + async function loadData() { var content = document.getElementById('content'); try { @@ -62,12 +68,12 @@ function render(data) { var customerBtc = btcBalance ? satsToBtc(btcBalance.customerBalance) : 0; var holdings = [ - { source: 'Onchain BTC', location: 'Bitcoin', btc: onchainBtc }, - { source: 'LND Onchain', location: 'LND Wallet', btc: lndOnchain }, - { source: 'Lightning', location: 'LN Channels', btc: lightning }, - { source: 'cBTC', location: 'Citrea', btc: cbtc }, - { source: 'WBTC', location: 'Ethereum', btc: wbtcEthereum }, - { source: 'WBTCe', location: 'Citrea', btc: wbtceCitrea }, + { source: 'Onchain BTC', location: 'Bitcoin', btc: onchainBtc, explorer: '' }, + { source: 'LND Onchain', location: 'LND Wallet', btc: lndOnchain, explorer: '' }, + { source: 'Lightning', location: 'LN Channels', btc: lightning, explorer: '' }, + { source: 'cBTC', location: 'Citrea', btc: cbtc, explorer: EXPLORERS.citrea }, + { source: 'WBTC', location: 'Ethereum', btc: wbtcEthereum, explorer: EXPLORERS.ethereum }, + { source: 'WBTCe', location: 'Citrea', btc: wbtceCitrea, explorer: EXPLORERS.citrea }, ]; var totalHoldings = 0; @@ -88,7 +94,11 @@ function render(data) { var h = holdings[i]; html += '
| TXID | Vout | Address | BTC | Confirmations | |
|---|---|---|---|---|---|
| Address | BTC | ||||
| ' + shortTxid + ' | '; - html += '' + u.vout + ' | '; - html += '' + u.address + ' | '; + html += '' + u.address + ' | '; html += '' + fmtBtc(u.amount) + ' | '; - html += '' + u.confirmations.toLocaleString() + ' | '; html += '
| ' + data.count + ' UTXOs | '; + html += ' | ' + data.count + ' UTXOs | '; html += '' + fmtBtc(data.totalAmount) + ' | '; - html += ''; html += ' |