Merge pull request #551 from embark-framework/fix_from
put defaultAccount as the default contract from
This commit is contained in:
commit
49d58b5d1e
|
@ -36,7 +36,7 @@ EmbarkJS.Contract = function (options) {
|
||||||
ContractClass = new this.web3.eth.Contract(this.abi, this.address);
|
ContractClass = new this.web3.eth.Contract(this.abi, this.address);
|
||||||
ContractClass.setProvider(this.web3.currentProvider);
|
ContractClass.setProvider(this.web3.currentProvider);
|
||||||
ContractClass.options.data = this.code;
|
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.abi = ContractClass.options.abi;
|
||||||
ContractClass.address = this.address;
|
ContractClass.address = this.address;
|
||||||
ContractClass.gas = this.gas;
|
ContractClass.gas = this.gas;
|
||||||
|
|
|
@ -36,7 +36,7 @@ EmbarkJS.Contract = function(options) {
|
||||||
ContractClass = new this.web3.eth.Contract(this.abi, this.address);
|
ContractClass = new this.web3.eth.Contract(this.abi, this.address);
|
||||||
ContractClass.setProvider(this.web3.currentProvider);
|
ContractClass.setProvider(this.web3.currentProvider);
|
||||||
ContractClass.options.data = this.code;
|
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.abi = ContractClass.options.abi;
|
||||||
ContractClass.address = this.address;
|
ContractClass.address = this.address;
|
||||||
ContractClass.gas = this.gas;
|
ContractClass.gas = this.gas;
|
||||||
|
|
Loading…
Reference in New Issue