mirror of https://github.com/embarklabs/embark.git
fix template
This commit is contained in:
parent
0742f96e38
commit
f0fe0e62e7
|
@ -1,9 +1,6 @@
|
|||
/* global __dirname module process require */
|
||||
|
||||
const { __ } = require('embark-i18n');
|
||||
const { dappPath, embarkPath, normalizePath, toForwardSlashes } = require('embark-utils');
|
||||
const constants = require('embark-core/constants');
|
||||
const path = require('path');
|
||||
const Web3 = require('web3');
|
||||
|
||||
require('ejs');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
console.dir("connection list TODO")
|
||||
console.dir(<%- connectionList %>)
|
||||
// console.dir("connection list TODO")
|
||||
// console.dir([<%- connectionList %>])
|
||||
const Web3 = require('web3')
|
||||
const web3 = new Web3("ws://localhost:8556");
|
||||
module.exports = web3;
|
||||
|
|
|
@ -10,14 +10,14 @@ class BlockchainClient {
|
|||
this.events.setCommandHandler("blockchain:client:register", (clientName, blockchainClient) => {
|
||||
this.blockchainClients[clientName] = blockchainClient;
|
||||
this.client = blockchainClient;
|
||||
})
|
||||
});
|
||||
|
||||
// TODO: unclear currently if this belongs here so it's a bit hardcoded for now
|
||||
this.events.setCommandHandler("blockchain:client:provider", (clientName, cb) => {
|
||||
const Web3 = require('web3');
|
||||
var web3 = new Web3("ws://localhost:8556");
|
||||
cb(null, web3.currentProvider);
|
||||
})
|
||||
});
|
||||
|
||||
// TODO: maybe not the ideal event to listen to?
|
||||
// for e.g, could wait for all stack components to be ready
|
||||
|
@ -28,10 +28,7 @@ class BlockchainClient {
|
|||
// should do stuff like
|
||||
// connect to endpoint given
|
||||
// set default account
|
||||
})
|
||||
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue