Revert "Delay contract deploiement if share bytecode"

This reverts commit 527dbcca8b.
This commit is contained in:
Iuri Matias 2018-09-26 17:39:11 -04:00
parent 142f04df06
commit 3ae5157e47
1 changed files with 1 additions and 22 deletions

View File

@ -20,7 +20,6 @@ class BlockchainConnector {
this.isDev = options.isDev;
this.web3Endpoint = '';
this.isWeb3Ready = false;
this.deployers = {};
self.events.setCommandHandler("blockchain:web3:isReady", (cb) => {
cb(self.isWeb3Ready);
@ -233,29 +232,9 @@ class BlockchainConnector {
}
deployContractFromObject(deployContractObject, params, cb) {
let deployer = this.deployers[deployContractObject._deployData];
if (!deployer) {
deployer = {running: false, requested: []};
this.deployers[deployContractObject._deployData] = deployer;
}
if (deployer.running) {
deployer.requested.push({deployContractObject, params, cb});
return;
}
deployer.running = true;
embarkJsUtils.secureSend(this.web3, deployContractObject, {
from: params.from, gas: params.gas, gasPrice: params.gasPrice
}, true, (error, receipt) => {
deployer.running = false;
if (deployer.requested.length > 0) {
let request = deployer.requested.shift();
this.deployContractFromObject(request.deployContractObject, request.params, request.cb);
}
cb(error, receipt);
});
}, true, cb);
}
determineDefaultAccount(cb) {