aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-watcher/src/utils
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-07-13 23:45:25 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-07-13 23:45:25 +0800
commit95e9f33f6aa5fa7849279062b008afa763a465d8 (patch)
tree085b1303c0576a1bafe471191253a416cbd939d2 /packages/order-watcher/src/utils
parentc599a20b34331c6481318d3cd3b01855444f339d (diff)
downloaddexon-sol-tools-95e9f33f6aa5fa7849279062b008afa763a465d8.tar
dexon-sol-tools-95e9f33f6aa5fa7849279062b008afa763a465d8.tar.gz
dexon-sol-tools-95e9f33f6aa5fa7849279062b008afa763a465d8.tar.bz2
dexon-sol-tools-95e9f33f6aa5fa7849279062b008afa763a465d8.tar.lz
dexon-sol-tools-95e9f33f6aa5fa7849279062b008afa763a465d8.tar.xz
dexon-sol-tools-95e9f33f6aa5fa7849279062b008afa763a465d8.tar.zst
dexon-sol-tools-95e9f33f6aa5fa7849279062b008afa763a465d8.zip
Migrate order-watcher to v2
Diffstat (limited to 'packages/order-watcher/src/utils')
-rw-r--r--packages/order-watcher/src/utils/assert.ts12
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`);
},
};