Browse Source

call electrum-client's initElectrum function

fix-133-memory-crash
Dan Janosik 6 years ago
parent
commit
7c9d9555db
  1. 8
      app/api/electrumApi.js

8
app/api/electrumApi.js

@ -18,12 +18,10 @@ function connectToServer(host, port) {
console.log("Connecting to ElectrumX Server: " + host + ":" + port);
var electrumClient = new ElectrumClient(port, host, 'tls');
electrumClient.connect().then(function() {
electrumClient.server_version("btc-rpc-explorer-1.1", "1.2").then(function(res) {
console.log("Connected to ElectrumX Server: " + host + ":" + port + ", versions: " + res);
electrumClient.initElectrum({client:"btc-rpc-explorer-v1.1", version:"1.2"}).then(function(res) {
console.log("Connected to ElectrumX Server: " + host + ":" + port + ", versions: " + res);
electrumClients.push(electrumClient);
});
electrumClients.push(electrumClient);
});
}

Loading…
Cancel
Save