From 95e9f33f6aa5fa7849279062b008afa763a465d8 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 13 Jul 2018 17:45:25 +0200 Subject: Migrate order-watcher to v2 --- packages/order-watcher/src/utils/assert.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'packages/order-watcher/src/utils') 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 { + const isValid = await isValidSignatureAsync(provider, orderHash, signature, signerAddress); this.assert(isValid, `Expected order with hash '${orderHash}' to have a valid signature`); }, }; -- cgit v1.2.3