mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-16 23:57:11 +00:00
fix(embarkjs/web3): make global web3 available again
This commit is contained in:
parent
d10d906ee7
commit
6e4a612fef
@ -165,18 +165,18 @@
|
|||||||
"viz.js": "1.8.2",
|
"viz.js": "1.8.2",
|
||||||
"web3": "1.0.0-beta.34",
|
"web3": "1.0.0-beta.34",
|
||||||
"web3-bzz": "1.0.0-beta.34",
|
"web3-bzz": "1.0.0-beta.34",
|
||||||
|
"web3-core": "1.0.0-beta.34",
|
||||||
"web3-core-helpers": "1.0.0-beta.34",
|
"web3-core-helpers": "1.0.0-beta.34",
|
||||||
"web3-core-method": "1.0.0-beta.34",
|
"web3-core-method": "1.0.0-beta.34",
|
||||||
"web3-core-promievent": "1.0.0-beta.34",
|
"web3-core-promievent": "1.0.0-beta.34",
|
||||||
"web3-core-requestmanager": "1.0.0-beta.34",
|
"web3-core-requestmanager": "1.0.0-beta.34",
|
||||||
"web3-core-subscriptions": "1.0.0-beta.34",
|
"web3-core-subscriptions": "1.0.0-beta.34",
|
||||||
"web3-core": "1.0.0-beta.34",
|
"web3-eth": "1.0.0-beta.34",
|
||||||
"web3-eth-abi": "1.0.0-beta.34",
|
"web3-eth-abi": "1.0.0-beta.34",
|
||||||
"web3-eth-accounts": "1.0.0-beta.34",
|
"web3-eth-accounts": "1.0.0-beta.34",
|
||||||
"web3-eth-contract": "1.0.0-beta.34",
|
"web3-eth-contract": "1.0.0-beta.34",
|
||||||
"web3-eth-iban": "1.0.0-beta.34",
|
"web3-eth-iban": "1.0.0-beta.34",
|
||||||
"web3-eth-personal": "1.0.0-beta.34",
|
"web3-eth-personal": "1.0.0-beta.34",
|
||||||
"web3-eth": "1.0.0-beta.34",
|
|
||||||
"web3-net": "1.0.0-beta.34",
|
"web3-net": "1.0.0-beta.34",
|
||||||
"web3-providers-http": "1.0.0-beta.34",
|
"web3-providers-http": "1.0.0-beta.34",
|
||||||
"web3-providers-ipc": "1.0.0-beta.34",
|
"web3-providers-ipc": "1.0.0-beta.34",
|
||||||
|
@ -4,6 +4,7 @@ const __embarkWeb3 = {};
|
|||||||
|
|
||||||
__embarkWeb3.init = function (_config) {
|
__embarkWeb3.init = function (_config) {
|
||||||
this.web3 = new Web3();
|
this.web3 = new Web3();
|
||||||
|
global.web3 = this.web3;
|
||||||
};
|
};
|
||||||
|
|
||||||
__embarkWeb3.getAccounts = function () {
|
__embarkWeb3.getAccounts = function () {
|
||||||
|
@ -181,12 +181,6 @@ class Test {
|
|||||||
function checkDeploymentOpts(next) {
|
function checkDeploymentOpts(next) {
|
||||||
self.checkDeploymentOptions(options, next);
|
self.checkDeploymentOptions(options, next);
|
||||||
},
|
},
|
||||||
function changeGlobalWeb3(next) {
|
|
||||||
self.events.request('blockchain:get', (web3) => {
|
|
||||||
global.web3 = web3;
|
|
||||||
next();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
function compileContracts(next) {
|
function compileContracts(next) {
|
||||||
if (!self.firstDeployment) {
|
if (!self.firstDeployment) {
|
||||||
return next();
|
return next();
|
||||||
@ -212,6 +206,12 @@ class Test {
|
|||||||
self.events.emit('tests:ready');
|
self.events.emit('tests:ready');
|
||||||
next(null, accounts);
|
next(null, accounts);
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
function changeGlobalWeb3(accounts, next) {
|
||||||
|
self.events.request('blockchain:get', (web3) => {
|
||||||
|
global.web3 = web3;
|
||||||
|
next(null, accounts);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
], (err, accounts) => {
|
], (err, accounts) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user