aboutsummaryrefslogtreecommitdiffstats
path: root/packages/base-contract
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base-contract')
-rw-r--r--packages/base-contract/package.json2
-rw-r--r--packages/base-contract/src/index.ts12
2 files changed, 6 insertions, 8 deletions
diff --git a/packages/base-contract/package.json b/packages/base-contract/package.json
index 0448cb33c..a7ce7cc73 100644
--- a/packages/base-contract/package.json
+++ b/packages/base-contract/package.json
@@ -39,7 +39,7 @@
"mocha": "^4.0.1",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
- "tslint": "5.10.0",
+ "tslint": "5.11.0",
"typescript": "2.7.1"
},
"dependencies": {
diff --git a/packages/base-contract/src/index.ts b/packages/base-contract/src/index.ts
index 6b970ec27..a240fb8b6 100644
--- a/packages/base-contract/src/index.ts
+++ b/packages/base-contract/src/index.ts
@@ -72,15 +72,13 @@ export class BaseContract {
// 1. Optional param passed in to public method call
// 2. Global config passed in at library instantiation
// 3. Gas estimate calculation + safety margin
- const removeUndefinedProperties = _.pickBy;
- const txDataWithDefaults: TxData = {
+ const removeUndefinedProperties = _.pickBy.bind(_);
+ const txDataWithDefaults = {
...removeUndefinedProperties(txDefaults),
- ...removeUndefinedProperties(txData as any),
- // HACK: TS can't prove that T is spreadable.
- // Awaiting https://github.com/Microsoft/TypeScript/pull/13288 to be merged
- } as any;
+ ...removeUndefinedProperties(txData),
+ };
if (_.isUndefined(txDataWithDefaults.gas) && !_.isUndefined(estimateGasAsync)) {
- txDataWithDefaults.gas = await estimateGasAsync(txDataWithDefaults as any);
+ txDataWithDefaults.gas = await estimateGasAsync(txDataWithDefaults);
}
return txDataWithDefaults;
}