From be8f9a5d92f2831892b895bfc8894504a307bb42 Mon Sep 17 00:00:00 2001 From: keraliss Date: Thu, 23 Apr 2026 16:15:51 +0530 Subject: [PATCH] switch block explorer to the signet one and fix confirmation count --- .gitignore | 3 +- src/components/market/Market.js | 35 +++--- src/components/send/Send.js | 2 +- src/components/swap/Swap.js | 2 +- src/components/wallet/TransactionsList.js | 2 +- src/components/wallet/UtxoList.js | 2 +- src/components/wallet/Wallet.js | 136 +++++++++++----------- src/styles/output.css | 3 + 8 files changed, 91 insertions(+), 94 deletions(-) diff --git a/.gitignore b/.gitignore index 1c91bc0..3c0be7b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ node_modules/ package-lock.json coinswap-ffi dist/ -squashfs-root/ \ No newline at end of file +squashfs-root/ +.DS_Store \ No newline at end of file diff --git a/src/components/market/Market.js b/src/components/market/Market.js index d624611..30e93ec 100644 --- a/src/components/market/Market.js +++ b/src/components/market/Market.js @@ -38,20 +38,20 @@ export function Market(container) { } } - function formatTorEndpoint(address, start = 14, end = 16) { + function formatTorEndpoint(address, start = 6, end = 0) { if (!address || typeof address !== 'string') return 'unknown'; const separatorIndex = address.lastIndexOf(':'); if (separatorIndex === -1) return address; - const host = address.slice(0, separatorIndex); + const host = address.slice(0, separatorIndex).replace(/\.onion$/i, ''); const port = address.slice(separatorIndex + 1); if (host.length <= start + end + 3) { return `${host}:${port}`; } - return `${host.slice(0, start)}...${host.slice(-end)}:${port}`; + return end > 0 ? `${host.slice(0, start)}..${host.slice(-end)}:${port}` : `${host.slice(0, start)}..:${port}`; } // Check sync state every second @@ -89,10 +89,16 @@ export function Market(container) { function transformMaker(item, index) { const offer = item.offer; - const addressObj = item.address || {}; - const onionAddr = addressObj.onion_addr || ''; - const port = addressObj.port || '6102'; - const fullAddress = `${onionAddr}:${port}`; + const addr = item.address; + let fullAddress; + if (typeof addr === 'string') { + fullAddress = addr.includes(':') ? addr : `${addr}:6102`; + } else { + const addressObj = addr || {}; + const onionAddr = addressObj.onion_addr || ''; + const port = addressObj.port || '6102'; + fullAddress = `${onionAddr}:${port}`; + } // Handle null offers (unresponsive makers) if (!offer) { @@ -584,7 +590,7 @@ export function Market(container) {

Bond Txid