fix lint
This commit is contained in:
parent
5e3740f088
commit
20406ba51a
|
@ -1,7 +1,7 @@
|
||||||
const async = require('async');
|
const async = require('async');
|
||||||
const Web3 = require('web3');
|
const Web3 = require('web3');
|
||||||
const { getWeiBalanceFromString, buildUrl } = require('../../utils/utils.js');
|
const {getWeiBalanceFromString, buildUrl} = require('../../utils/utils.js');
|
||||||
const { readFileSync, dappPath } = require('../../core/fs');
|
const {readFileSync, dappPath} = require('../../core/fs');
|
||||||
|
|
||||||
class DevFunds {
|
class DevFunds {
|
||||||
constructor(blockchainConfig) {
|
constructor(blockchainConfig) {
|
||||||
|
@ -36,7 +36,7 @@ class DevFunds {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
setInterval(function() { self._sendTx() }, 3000);
|
setInterval(function() { self._sendTx(); }, 3000);
|
||||||
if (cb) {
|
if (cb) {
|
||||||
cb();
|
cb();
|
||||||
}
|
}
|
||||||
|
@ -45,12 +45,12 @@ class DevFunds {
|
||||||
|
|
||||||
regularUnlocks() {
|
regularUnlocks() {
|
||||||
const self = this;
|
const self = this;
|
||||||
setInterval(function() { self.unlockAccounts(self.password, () => {}) }, 20000);
|
setInterval(function() { self.unlockAccounts(self.password, () => {}); }, 20000);
|
||||||
}
|
}
|
||||||
|
|
||||||
connectToNode(cb) {
|
connectToNode(cb) {
|
||||||
|
|
||||||
this.web3.setProvider(new Web3.providers.WebsocketProvider(buildUrl('ws', this.blockchainConfig.wsHost, this.blockchainConfig.wsPort), { headers: { Origin: "http://localhost:8000" } }));
|
this.web3.setProvider(new Web3.providers.WebsocketProvider(buildUrl('ws', this.blockchainConfig.wsHost, this.blockchainConfig.wsPort), {headers: {Origin: "http://localhost:8000"}}));
|
||||||
|
|
||||||
this.web3.eth.getAccounts().then((accounts) => {
|
this.web3.eth.getAccounts().then((accounts) => {
|
||||||
this.web3.eth.defaultAccount = accounts[0];
|
this.web3.eth.defaultAccount = accounts[0];
|
||||||
|
|
|
@ -47,7 +47,7 @@ function fundAccount(web3, accountAddress, hexBalance, nonce, callback) {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
function getNonce(next) {
|
function getNonce(next) {
|
||||||
web3.eth.getTransactionCount(coinbaseAddress, (err, nonce) => {
|
web3.eth.getTransactionCount(coinbaseAddress, (err, _nonce) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
return next(err);
|
return next(err);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue