aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract-wrappers
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-05-14 17:30:51 +0800
committerFabio Berger <me@fabioberger.com>2018-05-14 17:30:51 +0800
commitc94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6 (patch)
tree986b220cf80aab8d8e8ef6c4cef8c08be6eeab10 /packages/contract-wrappers
parent7d60356facce60c1d4d80c703bfc565c5c47e73b (diff)
parent58fa35641d3016ef106496c929e48febcf827dc6 (diff)
downloaddexon-sol-tools-c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6.tar
dexon-sol-tools-c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6.tar.gz
dexon-sol-tools-c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6.tar.bz2
dexon-sol-tools-c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6.tar.lz
dexon-sol-tools-c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6.tar.xz
dexon-sol-tools-c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6.tar.zst
dexon-sol-tools-c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6.zip
Merge branch 'development' of github.com:0xProject/0x-monorepo into development
* 'development' of github.com:0xProject/0x-monorepo: Add missing type definitions
Diffstat (limited to 'packages/contract-wrappers')
-rw-r--r--packages/contract-wrappers/src/utils/assert.ts2
-rw-r--r--packages/contract-wrappers/src/utils/decorators.ts4
-rw-r--r--packages/contract-wrappers/src/utils/order_validation_utils.ts4
3 files changed, 5 insertions, 5 deletions
diff --git a/packages/contract-wrappers/src/utils/assert.ts b/packages/contract-wrappers/src/utils/assert.ts
index 2588a4d09..c74ed341f 100644
--- a/packages/contract-wrappers/src/utils/assert.ts
+++ b/packages/contract-wrappers/src/utils/assert.ts
@@ -12,7 +12,7 @@ import { isValidSignature } from '@0xproject/order-utils';
export const assert = {
...sharedAssert,
- isValidSignature(orderHash: string, ecSignature: ECSignature, signerAddress: string) {
+ isValidSignature(orderHash: string, ecSignature: ECSignature, signerAddress: string): void {
const isValid = isValidSignature(orderHash, ecSignature, signerAddress);
this.assert(isValid, `Expected order with hash '${orderHash}' to have a valid signature`);
},
diff --git a/packages/contract-wrappers/src/utils/decorators.ts b/packages/contract-wrappers/src/utils/decorators.ts
index 64123143c..494575e7b 100644
--- a/packages/contract-wrappers/src/utils/decorators.ts
+++ b/packages/contract-wrappers/src/utils/decorators.ts
@@ -39,7 +39,7 @@ const asyncErrorHandlerFactory = (errorTransformer: ErrorTransformer) => {
// Do not use arrow syntax here. Use a function expression in
// order to use the correct value of `this` in this method
// tslint:disable-next-line:only-arrow-functions
- descriptor.value = async function(...args: any[]) {
+ descriptor.value = async function(...args: any[]): Promise<any> {
try {
const result = await originalMethod.apply(this, args);
return result;
@@ -66,7 +66,7 @@ const syncErrorHandlerFactory = (errorTransformer: ErrorTransformer) => {
// Do not use arrow syntax here. Use a function expression in
// order to use the correct value of `this` in this method
// tslint:disable-next-line:only-arrow-functions
- descriptor.value = function(...args: any[]) {
+ descriptor.value = function(...args: any[]): any {
try {
const result = originalMethod.apply(this, args);
return result;
diff --git a/packages/contract-wrappers/src/utils/order_validation_utils.ts b/packages/contract-wrappers/src/utils/order_validation_utils.ts
index 36dfbd800..362c605de 100644
--- a/packages/contract-wrappers/src/utils/order_validation_utils.ts
+++ b/packages/contract-wrappers/src/utils/order_validation_utils.ts
@@ -86,12 +86,12 @@ export class OrderValidationUtils {
private static _validateRemainingFillAmountNotZeroOrThrow(
takerTokenAmount: BigNumber,
unavailableTakerTokenAmount: BigNumber,
- ) {
+ ): void {
if (takerTokenAmount.eq(unavailableTakerTokenAmount)) {
throw new Error(ExchangeContractErrs.OrderRemainingFillAmountZero);
}
}
- private static _validateOrderNotExpiredOrThrow(expirationUnixTimestampSec: BigNumber) {
+ private static _validateOrderNotExpiredOrThrow(expirationUnixTimestampSec: BigNumber): void {
const currentUnixTimestampSec = utils.getCurrentUnixTimestampSec();
if (expirationUnixTimestampSec.lessThan(currentUnixTimestampSec)) {
throw new Error(ExchangeContractErrs.OrderFillExpired);