mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 15:04:50 +01:00
FIX: electrum connection
This commit is contained in:
parent
b9cf5c6172
commit
c4b7c9d7a1
1 changed files with 2 additions and 3 deletions
|
@ -43,12 +43,11 @@ async function connectMain() {
|
||||||
};
|
};
|
||||||
await mainClient.connect();
|
await mainClient.connect();
|
||||||
const ver = await mainClient.server_version('2.7.11', '1.4');
|
const ver = await mainClient.server_version('2.7.11', '1.4');
|
||||||
let peers = await mainClient.serverPeers_subscribe();
|
if (ver && ver[0]) {
|
||||||
if (peers && peers.length > 0) {
|
|
||||||
console.log('connected to ', ver);
|
console.log('connected to ', ver);
|
||||||
mainConnected = true;
|
mainConnected = true;
|
||||||
wasConnectedAtLeastOnce = true;
|
wasConnectedAtLeastOnce = true;
|
||||||
AsyncStorage.setItem(storageKey, JSON.stringify(peers));
|
// AsyncStorage.setItem(storageKey, JSON.stringify(peers)); TODO: refactor
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
mainConnected = false;
|
mainConnected = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue