From d1065cd266b204f7b7f7468f5fbe0d663acf2a7b Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 23 Nov 2017 11:19:06 -0600 Subject: Add an initializer for txOpts in etherToken --- packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'packages/0x.js/src') diff --git a/packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts b/packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts index 65f1cda24..ede0460bd 100644 --- a/packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts @@ -31,7 +31,9 @@ export class EtherTokenWrapper extends ContractWrapper { * @param txOpts Transaction parameters. * @return Transaction hash. */ - public async depositAsync(amountInWei: BigNumber, depositor: string, txOpts: TransactionOpts): Promise { + public async depositAsync( + amountInWei: BigNumber, depositor: string, txOpts: TransactionOpts = {}, + ): Promise { assert.isValidBaseUnitAmount('amountInWei', amountInWei); await assert.isSenderAddressAsync('depositor', depositor, this._web3Wrapper); @@ -55,7 +57,9 @@ export class EtherTokenWrapper extends ContractWrapper { * @param txOpts Transaction parameters. * @return Transaction hash. */ - public async withdrawAsync(amountInWei: BigNumber, withdrawer: string, txOpts: TransactionOpts): Promise { + public async withdrawAsync( + amountInWei: BigNumber, withdrawer: string, txOpts: TransactionOpts = {}, + ): Promise { assert.isValidBaseUnitAmount('amountInWei', amountInWei); await assert.isSenderAddressAsync('withdrawer', withdrawer, this._web3Wrapper); -- cgit v1.2.3