Skip to content

Commit

Permalink
Merge pull request #131 from pipermerriam/piper/respect-defaultAccoun…
Browse files Browse the repository at this point in the history
…t-config-within-contracts

Respect the  configuration within contract initiated transactions
  • Loading branch information
pipermerriam committed Dec 29, 2016
2 parents e0778d0 + 2b2273e commit d45b9b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web3/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def estimateGas(self, transaction=None):

if self.address:
estimate_transaction.setdefault('to', self.address)
estimate_transaction.setdefault('from', self.web3.eth.coinbase)
estimate_transaction.setdefault('from', self.web3.eth.defaultAccount)

if 'to' not in estimate_transaction:
if isinstance(self, type):
Expand Down Expand Up @@ -370,7 +370,7 @@ def call(self, transaction=None):

if self.address:
call_transaction.setdefault('to', self.address)
call_transaction.setdefault('from', self.web3.eth.coinbase)
call_transaction.setdefault('from', self.web3.eth.defaultAccount)

if 'to' not in call_transaction:
if isinstance(self, type):
Expand Down

0 comments on commit d45b9b4

Please sign in to comment.