From 1b4cb5ced615f0e00ae2b4707dad6a490460510e Mon Sep 17 00:00:00 2001 From: lsaether Date: Wed, 31 Jan 2018 13:54:05 -0700 Subject: [PATCH] npm publish --- package.json | 2 +- src/cli/eac.js | 2 +- src/client/main.js | 2 +- src/client/scanning.js | 9 ++++++--- src/util.js | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 32dc3ba..617f69c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eac.js", - "version": "1.0.5", + "version": "1.1.0", "description": "Commnandline tool to interact with the Ethereum Alarm Clock contracts.", "main": "./src/index.js", "scripts": { diff --git a/src/cli/eac.js b/src/cli/eac.js index 0301efe..ad0b52d 100755 --- a/src/cli/eac.js +++ b/src/cli/eac.js @@ -19,7 +19,7 @@ const log = { // Parse the command line options using commander. program - .version("1.0.5") + .version("1.1.0") // Client options .option("-c, --client", "starts the executing client") .option( diff --git a/src/client/main.js b/src/client/main.js index 8cdb655..95d982d 100644 --- a/src/client/main.js +++ b/src/client/main.js @@ -51,7 +51,7 @@ const main = async ( ) => { const eac = require("../index")(web3) // Assigns chain to the name of the network ID - const chain = eac.Util.getChainName() + const chain = await eac.Util.getChainName() // Loads the contracts let requestFactory, requestTracker diff --git a/src/client/scanning.js b/src/client/scanning.js index c937235..2344b1d 100644 --- a/src/client/scanning.js +++ b/src/client/scanning.js @@ -114,10 +114,13 @@ const scanCache = async conf => { const allTxRequests = conf.cache .stored() - .map(address => await eac.transactionRequest(address)) + .map(address => eac.transactionRequest(address)) - allTxRequests.forEach(txRequest => { - txRequest.refreshData().then(_ => routeTxRequest(conf, txRequest)) + Promise.all(allTxRequests) + .then(txRequests => { + txRequests.forEach(txRequest => { + txRequest.refreshData().then(_ => routeTxRequest(conf, txRequest)) + }) }) } diff --git a/src/util.js b/src/util.js index 4343fa9..2174b47 100644 --- a/src/util.js +++ b/src/util.js @@ -179,7 +179,7 @@ module.exports = web3 => { checkValidAddress, estimateGas: opts => estimateGas(web3, opts), getABI, - getBalance: address => getBalance(address), + getBalance: address => getBalance(web3, address), getBlockNumber: () => getBlockNumber(web3), getChainName: () => getChainName(web3), getGasPrice: () => getGasPrice(web3),