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 */
|
/* global __dirname module process require */
|
||||||
|
|
||||||
const { __ } = require('embark-i18n');
|
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');
|
const Web3 = require('web3');
|
||||||
|
|
||||||
require('ejs');
|
require('ejs');
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
console.dir("connection list TODO")
|
// console.dir("connection list TODO")
|
||||||
console.dir(<%- connectionList %>)
|
// console.dir([<%- connectionList %>])
|
||||||
const Web3 = require('web3')
|
const Web3 = require('web3')
|
||||||
const web3 = new Web3("ws://localhost:8556");
|
const web3 = new Web3("ws://localhost:8556");
|
||||||
module.exports = web3;
|
module.exports = web3;
|
||||||
|
|
|
@ -10,14 +10,14 @@ class BlockchainClient {
|
||||||
this.events.setCommandHandler("blockchain:client:register", (clientName, blockchainClient) => {
|
this.events.setCommandHandler("blockchain:client:register", (clientName, blockchainClient) => {
|
||||||
this.blockchainClients[clientName] = blockchainClient;
|
this.blockchainClients[clientName] = blockchainClient;
|
||||||
this.client = blockchainClient;
|
this.client = blockchainClient;
|
||||||
})
|
});
|
||||||
|
|
||||||
// TODO: unclear currently if this belongs here so it's a bit hardcoded for now
|
// TODO: unclear currently if this belongs here so it's a bit hardcoded for now
|
||||||
this.events.setCommandHandler("blockchain:client:provider", (clientName, cb) => {
|
this.events.setCommandHandler("blockchain:client:provider", (clientName, cb) => {
|
||||||
const Web3 = require('web3');
|
const Web3 = require('web3');
|
||||||
var web3 = new Web3("ws://localhost:8556");
|
var web3 = new Web3("ws://localhost:8556");
|
||||||
cb(null, web3.currentProvider);
|
cb(null, web3.currentProvider);
|
||||||
})
|
});
|
||||||
|
|
||||||
// TODO: maybe not the ideal event to listen to?
|
// TODO: maybe not the ideal event to listen to?
|
||||||
// for e.g, could wait for all stack components to be ready
|
// for e.g, could wait for all stack components to be ready
|
||||||
|
@ -28,10 +28,7 @@ class BlockchainClient {
|
||||||
// should do stuff like
|
// should do stuff like
|
||||||
// connect to endpoint given
|
// connect to endpoint given
|
||||||
// set default account
|
// set default account
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue