mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-20 18:50:16 +00:00
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: {
|
default: {
|
||||||
// order of connections the dapp should connect to
|
// order of connections the dapp should connect to
|
||||||
dappConnection: [
|
dappConnection: [
|
||||||
|
"$EMBARK",
|
||||||
"$WEB3", // uses pre existing web3 object if available (e.g in Mist)
|
"$WEB3", // uses pre existing web3 object if available (e.g in Mist)
|
||||||
"ws://localhost:8546",
|
"ws://localhost:8546",
|
||||||
"http://localhost:8545"
|
"http://localhost:8545"
|
||||||
@ -38,26 +39,12 @@ module.exports = {
|
|||||||
|
|
||||||
// default environment, merges with the settings in default
|
// default environment, merges with the settings in default
|
||||||
// assumed to be the intended environment by `embark run`
|
// assumed to be the intended environment by `embark run`
|
||||||
development: {
|
development: {},
|
||||||
dappConnection: [
|
|
||||||
"ws://localhost:8546",
|
|
||||||
"http://localhost:8545",
|
|
||||||
"$WEB3" // uses pre existing web3 object if available (e.g in Mist)
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
// merges with the settings in default
|
// merges with the settings in default
|
||||||
// used with "embark run privatenet"
|
// used with "embark run privatenet"
|
||||||
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
|
// you can name an environment with specific settings and then specify with
|
||||||
// "embark run custom_name" or "embark blockchain custom_name"
|
// "embark run custom_name" or "embark blockchain custom_name"
|
||||||
// custom_name: {}
|
// custom_name: {}
|
||||||
|
@ -28,7 +28,6 @@ module.exports = {
|
|||||||
// default environment, merges with the settings in default
|
// default environment, merges with the settings in default
|
||||||
// assumed to be the intended environment by `embark run`
|
// assumed to be the intended environment by `embark run`
|
||||||
development: {
|
development: {
|
||||||
enabled: true,
|
|
||||||
upload: {
|
upload: {
|
||||||
provider: "ipfs",
|
provider: "ipfs",
|
||||||
host: "localhost",
|
host: "localhost",
|
||||||
|
@ -39,26 +39,12 @@ module.exports = {
|
|||||||
|
|
||||||
// default environment, merges with the settings in default
|
// default environment, merges with the settings in default
|
||||||
// assumed to be the intended environment by `embark run`
|
// assumed to be the intended environment by `embark run`
|
||||||
development: {
|
development: {},
|
||||||
dappConnection: [
|
|
||||||
"ws://localhost:8546",
|
|
||||||
"http://localhost:8545",
|
|
||||||
"$WEB3" // uses pre existing web3 object if available (e.g in Mist)
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
// merges with the settings in default
|
// merges with the settings in default
|
||||||
// used with "embark run privatenet"
|
// used with "embark run privatenet"
|
||||||
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
|
// you can name an environment with specific settings and then specify with
|
||||||
// "embark run custom_name" or "embark blockchain custom_name"
|
// "embark run custom_name" or "embark blockchain custom_name"
|
||||||
// custom_name: {}
|
// custom_name: {}
|
||||||
|
@ -28,7 +28,6 @@ module.exports = {
|
|||||||
// default environment, merges with the settings in default
|
// default environment, merges with the settings in default
|
||||||
// assumed to be the intended environment by `embark run`
|
// assumed to be the intended environment by `embark run`
|
||||||
development: {
|
development: {
|
||||||
enabled: true,
|
|
||||||
upload: {
|
upload: {
|
||||||
provider: "ipfs",
|
provider: "ipfs",
|
||||||
host: "localhost",
|
host: "localhost",
|
||||||
|
@ -26,12 +26,12 @@ class EmbarkWeb3 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async setupEmbarkJS() {
|
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 () => {
|
this.events.on("blockchain:started", async () => {
|
||||||
await this.registerWeb3Object();
|
await this.registerWeb3Object();
|
||||||
this.events.request("embarkjs:console:setProvider", 'blockchain', 'web3', '{web3}');
|
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() {
|
async setupWeb3Api() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user