diff options
Diffstat (limited to 'packages/order-watcher/src/utils')
-rw-r--r-- | packages/order-watcher/src/utils/assert.ts | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/packages/order-watcher/src/utils/assert.ts b/packages/order-watcher/src/utils/assert.ts index 9c992d9b4..fa22617c7 100644 --- a/packages/order-watcher/src/utils/assert.ts +++ b/packages/order-watcher/src/utils/assert.ts @@ -5,13 +5,19 @@ import { Schema } from '@0xproject/json-schemas'; import { ECSignature } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; // tslint:enable:no-unused-variable +import { Provider } from 'ethereum-types'; -import { isValidSignature } from '@0xproject/order-utils'; +import { isValidSignatureAsync } from '@0xproject/order-utils'; export const assert = { ...sharedAssert, - isValidSignature(orderHash: string, ecSignature: ECSignature, signerAddress: string): void { - const isValid = isValidSignature(orderHash, ecSignature, signerAddress); + async isValidSignatureAsync( + provider: Provider, + orderHash: string, + signature: string, + signerAddress: string, + ): Promise<void> { + const isValid = await isValidSignatureAsync(provider, orderHash, signature, signerAddress); this.assert(isValid, `Expected order with hash '${orderHash}' to have a valid signature`); }, }; |