mirror of https://github.com/embarklabs/embark.git
Fix VM as a client and cleanup template configs (#1966)
* chore(templates): clean up template configs * fix: enable vm as a client Bug was caused by the web3 listening to events too late (race)
This commit is contained in:
parent
913267b1ce
commit
d86c26d71a
|
@ -3,6 +3,7 @@ module.exports = {
|
|||
default: {
|
||||
// order of connections the dapp should connect to
|
||||
dappConnection: [
|
||||
"$EMBARK",
|
||||
"$WEB3", // uses pre existing web3 object if available (e.g in Mist)
|
||||
"ws://localhost:8546",
|
||||
"http://localhost:8545"
|
||||
|
@ -38,26 +39,12 @@ module.exports = {
|
|||
|
||||
// default environment, merges with the settings in default
|
||||
// assumed to be the intended environment by `embark run`
|
||||
development: {
|
||||
dappConnection: [
|
||||
"ws://localhost:8546",
|
||||
"http://localhost:8545",
|
||||
"$WEB3" // uses pre existing web3 object if available (e.g in Mist)
|
||||
]
|
||||
},
|
||||
development: {},
|
||||
|
||||
// merges with the settings in default
|
||||
// used with "embark run privatenet"
|
||||
privatenet: {},
|
||||
|
||||
// merges with the settings in default
|
||||
// used with "embark run testnet"
|
||||
testnet: {},
|
||||
|
||||
// merges with the settings in default
|
||||
// used with "embark run livenet"
|
||||
livenet: {}
|
||||
|
||||
// you can name an environment with specific settings and then specify with
|
||||
// "embark run custom_name" or "embark blockchain custom_name"
|
||||
// custom_name: {}
|
||||
|
|
|
@ -28,7 +28,6 @@ module.exports = {
|
|||
// default environment, merges with the settings in default
|
||||
// assumed to be the intended environment by `embark run`
|
||||
development: {
|
||||
enabled: true,
|
||||
upload: {
|
||||
provider: "ipfs",
|
||||
host: "localhost",
|
||||
|
|
|
@ -39,26 +39,12 @@ module.exports = {
|
|||
|
||||
// default environment, merges with the settings in default
|
||||
// assumed to be the intended environment by `embark run`
|
||||
development: {
|
||||
dappConnection: [
|
||||
"ws://localhost:8546",
|
||||
"http://localhost:8545",
|
||||
"$WEB3" // uses pre existing web3 object if available (e.g in Mist)
|
||||
]
|
||||
},
|
||||
development: {},
|
||||
|
||||
// merges with the settings in default
|
||||
// used with "embark run privatenet"
|
||||
privatenet: {},
|
||||
|
||||
// merges with the settings in default
|
||||
// used with "embark run testnet"
|
||||
testnet: {},
|
||||
|
||||
// merges with the settings in default
|
||||
// used with "embark run livenet"
|
||||
livenet: {}
|
||||
|
||||
// you can name an environment with specific settings and then specify with
|
||||
// "embark run custom_name" or "embark blockchain custom_name"
|
||||
// custom_name: {}
|
||||
|
|
|
@ -28,7 +28,6 @@ module.exports = {
|
|||
// default environment, merges with the settings in default
|
||||
// assumed to be the intended environment by `embark run`
|
||||
development: {
|
||||
enabled: true,
|
||||
upload: {
|
||||
provider: "ipfs",
|
||||
host: "localhost",
|
||||
|
|
|
@ -26,12 +26,12 @@ class EmbarkWeb3 {
|
|||
}
|
||||
|
||||
async setupEmbarkJS() {
|
||||
this.events.request("embarkjs:plugin:register", 'blockchain', 'web3', 'embarkjs-web3');
|
||||
await this.events.request2("embarkjs:console:register", 'blockchain', 'web3', 'embarkjs-web3');
|
||||
this.events.on("blockchain:started", async () => {
|
||||
await this.registerWeb3Object();
|
||||
this.events.request("embarkjs:console:setProvider", 'blockchain', 'web3', '{web3}');
|
||||
});
|
||||
this.events.request("embarkjs:plugin:register", 'blockchain', 'web3', 'embarkjs-web3');
|
||||
await this.events.request2("embarkjs:console:register", 'blockchain', 'web3', 'embarkjs-web3');
|
||||
}
|
||||
|
||||
async setupWeb3Api() {
|
||||
|
|
Loading…
Reference in New Issue