FIX: Allow onion preferred as user could be on Orbot

This commit is contained in:
Marcos Rodriguez Velez 2025-02-14 14:58:58 -04:00
parent 9a8158a384
commit 6cd6079493

View file

@ -239,19 +239,6 @@ export async function connectMain(): Promise<void> {
console.log('Using peer:', JSON.stringify(usingPeer));
await DefaultPreference.setName(GROUP_IO_BLUEWALLET);
try {
if (usingPeer.host.endsWith('onion')) {
const randomPeer = getCurrentPeer();
await DefaultPreference.set(ELECTRUM_HOST, randomPeer.host);
await DefaultPreference.set(ELECTRUM_TCP_PORT, randomPeer.tcp ?? '');
await DefaultPreference.set(ELECTRUM_SSL_PORT, randomPeer.ssl ?? '');
}
} catch (e) {
// Must be running on Android
console.log(e);
}
try {
console.log('begin connection:', JSON.stringify(usingPeer));
mainClient = new ElectrumClient(net, tls, usingPeer.ssl || usingPeer.tcp, usingPeer.host, usingPeer.ssl ? 'tls' : 'tcp');