Merge pull request #551 from embark-framework/fix_from

put defaultAccount as the default contract from
This commit is contained in:
Iuri Matias 2018-06-18 14:23:52 -04:00 committed by GitHub
commit 49d58b5d1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ EmbarkJS.Contract = function (options) {
ContractClass = new this.web3.eth.Contract(this.abi, this.address);
ContractClass.setProvider(this.web3.currentProvider);
ContractClass.options.data = this.code;
ContractClass.options.from = this.from;
ContractClass.options.from = this.from || this.web3.eth.defaultAccount;
ContractClass.abi = ContractClass.options.abi;
ContractClass.address = this.address;
ContractClass.gas = this.gas;

View File

@ -36,7 +36,7 @@ EmbarkJS.Contract = function(options) {
ContractClass = new this.web3.eth.Contract(this.abi, this.address);
ContractClass.setProvider(this.web3.currentProvider);
ContractClass.options.data = this.code;
ContractClass.options.from = this.from;
ContractClass.options.from = this.from || this.web3.eth.defaultAccount;
ContractClass.abi = ContractClass.options.abi;
ContractClass.address = this.address;
ContractClass.gas = this.gas;