mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-16 09:03:54 -05:00
feat(GUI): also poll Electrum servers for their status (#710)
This commit is contained in:
parent
cac988524f
commit
d7ca051c20
1 changed files with 15 additions and 9 deletions
|
|
@ -293,15 +293,21 @@ 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() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue