Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "aa-hooks", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Library for working with autonomous agent events", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
const { v4: uuidv4 } = require('uuid'); | ||
const conf = require('ocore/conf.js'); | ||
const network = require('ocore/network.js'); | ||
// const network = require('ocore/network.js'); | ||
const eventBus = require('ocore/event_bus.js'); | ||
@@ -11,8 +11,4 @@ const lightWallet = require('ocore/light_wallet.js'); | ||
lightWallet.setLightVendorHost(conf.hub); | ||
// lightWallet.setLightVendorHost(conf.hub); | ||
eventBus.once('connected', function (ws) { | ||
network.initWitnessesIfNecessary(ws, () => console.error('start')); | ||
}); | ||
const defaultConfig = { | ||
@@ -43,2 +39,3 @@ newEventsOnly: false, | ||
eventBus.on('connected', async (ws) => { | ||
// network.initWitnessesIfNecessary(ws, onConnected); | ||
for (let i = 0; i < addresses.length; i++) { | ||
@@ -52,3 +49,3 @@ dag.loadAA(addresses[i]); | ||
network.initWitnessesIfNecessary(ws, () => console.error('start---------->')); | ||
// network.initWitnessesIfNecessary(ws, () => console.error('start---------->')); | ||
}); | ||
@@ -111,3 +108,3 @@ | ||
/** | ||
* @param {string} address | ||
* @param {string} address | ||
*/ | ||
@@ -114,0 +111,0 @@ async addWatchedAddress(address) { |
117673
556