feat(GUI): also poll Electrum servers for their status (#710)

This commit is contained in:
наб 2025-11-12 01:29:00 +01:00 committed by GitHub
parent cac988524f
commit d7ca051c20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -293,16 +293,22 @@ export async function updateAllNodeStatuses() {
const network = getNetwork(); const network = getNetwork();
const settings = store.getState().settings; const settings = store.getState().settings;
// Only check Monero nodes if we're using custom nodes (not RPC pool) // We pass all electrum servers to the backend without checking them (ElectrumBalancer handles failover),
// Skip Bitcoin nodes since we pass all electrum servers to the backend without checking them (ElectrumBalancer handles failover) // but check these anyway since the status appears in the GUI.
if (!settings.useMoneroRpcPool) { // Only check Monero nodes if we're using custom nodes (not RPC pool).
await Promise.all( await Promise.all(
settings.nodes[network][Blockchain.Monero].map((node) => (settings.useMoneroRpcPool
updateNodeStatus(node, Blockchain.Monero, network), ? [Blockchain.Bitcoin]
: [Blockchain.Bitcoin, Blockchain.Monero]
)
.map((blockchain) =>
settings.nodes[network][blockchain].map((node) =>
updateNodeStatus(node, blockchain, network),
), ),
)
.flat(),
); );
} }
}
export async function cheapCheckBitcoinBalance() { export async function cheapCheckBitcoinBalance() {
const response = await invoke<BalanceArgs, BalanceResponse>("get_balance", { const response = await invoke<BalanceArgs, BalanceResponse>("get_balance", {