Skip to content

Commit

Permalink
Contract options extended to be able to configure singles contracts w…
Browse files Browse the repository at this point in the history
…ithout re-loading of the object methods
  • Loading branch information
nivida committed Dec 2, 2019
1 parent 842e2b8 commit 9db572c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/web3-eth-contract/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@ var Contract = function Contract(jsonInterface, address, options) {
// get default account from the Class
var defaultAccount = this.constructor.defaultAccount;
var defaultBlock = this.constructor.defaultBlock || 'latest';
this.transactionBlockTimeout = this.constructor.transactionBlockTimeout;
this.transactionConfirmationBlocks = this.constructor.transactionConfirmationBlocks;
this.transactionPollingTimeout = this.constructor.transactionPollingTimeout;
this.defaultChain = this.constructor.defaultChain;
this.defaultHardfork = this.constructor.defaultHardfork;
this.defaultCommon = this.constructor.defaultCommon;
this.handleRevert = this.constructor.handleRevert;
this.transactionBlockTimeout = this.options.transactionBlockTimeout || this.constructor.transactionBlockTimeout;
this.transactionConfirmationBlocks = this.options.transactionConfirmationBlocks || this.constructor.transactionConfirmationBlocks;
this.transactionPollingTimeout = this.options.transactionPollingTimeout || this.constructor.transactionPollingTimeout;
this.defaultChain = this.options.defaultChain || this.constructor.defaultChain;
this.defaultHardfork = this.options.defaultHardfork || this.constructor.defaultHardfork;
this.defaultCommon = this.options.defaultCommon || this.constructor.defaultCommon;
this.handleRevert = this.options.handleRevert || this.constructor.handleRevert;

Object.defineProperty(this, 'defaultAccount', {
get: function () {
Expand Down

0 comments on commit 9db572c

Please sign in to comment.