aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-11-24 01:19:06 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-11-28 07:36:27 +0800
commitd1065cd266b204f7b7f7468f5fbe0d663acf2a7b (patch)
tree96ec74a5cd8901286e3e918a98d4e005b4c86d35
parent0e44a630f0479651522179df5743d80e6f596ace (diff)
downloaddexon-sol-tools-d1065cd266b204f7b7f7468f5fbe0d663acf2a7b.tar
dexon-sol-tools-d1065cd266b204f7b7f7468f5fbe0d663acf2a7b.tar.gz
dexon-sol-tools-d1065cd266b204f7b7f7468f5fbe0d663acf2a7b.tar.bz2
dexon-sol-tools-d1065cd266b204f7b7f7468f5fbe0d663acf2a7b.tar.lz
dexon-sol-tools-d1065cd266b204f7b7f7468f5fbe0d663acf2a7b.tar.xz
dexon-sol-tools-d1065cd266b204f7b7f7468f5fbe0d663acf2a7b.tar.zst
dexon-sol-tools-d1065cd266b204f7b7f7468f5fbe0d663acf2a7b.zip
Add an initializer for txOpts in etherToken
-rw-r--r--packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts8
1 files changed, 6 insertions, 2 deletions
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<string> {
+ public async depositAsync(
+ amountInWei: BigNumber, depositor: string, txOpts: TransactionOpts = {},
+ ): Promise<string> {
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<string> {
+ public async withdrawAsync(
+ amountInWei: BigNumber, withdrawer: string, txOpts: TransactionOpts = {},
+ ): Promise<string> {
assert.isValidBaseUnitAmount('amountInWei', amountInWei);
await assert.isSenderAddressAsync('withdrawer', withdrawer, this._web3Wrapper);