mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-23 02:48:21 +00:00
fix: use our global Web3 and not Metamask's
This commit is contained in:
parent
129a35484f
commit
9ccc453379
@ -50,9 +50,9 @@ module.exports = async (embark) => {
|
||||
web3Location = web3Location.replace(/\\/g, '/');
|
||||
|
||||
|
||||
embark.events.emit('runcode:register', 'Web3', require(web3Location), false);
|
||||
embark.events.emit('runcode:register', '__Web3', require(web3Location), false);
|
||||
|
||||
let code = `\nconst Web3 = global.Web3 || require('${web3Location}');`;
|
||||
let code = `\nconst Web3 = global.__Web3 || require('${web3Location}');`;
|
||||
code += `\nglobal.Web3 = Web3;`;
|
||||
|
||||
const connectorCode = fs.readFileSync(path.join(__dirname, 'web3Connector.js'), 'utf8');
|
||||
|
Loading…
x
Reference in New Issue
Block a user