aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-watcher/src/utils
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-19 22:38:33 +0800
committerFabio Berger <me@fabioberger.com>2018-07-19 22:38:33 +0800
commitb6de0bdd43d53204fbbe9a13d44658963a7f2725 (patch)
tree45a7084ff4de40deab8b79fc689e4718e365e7b2 /packages/order-watcher/src/utils
parenta2b62fd8085df2121424fd8a9defee42879971ce (diff)
parent886a03fdcd4893a57f88fa407de94852cb0a2285 (diff)
downloaddexon-sol-tools-b6de0bdd43d53204fbbe9a13d44658963a7f2725.tar
dexon-sol-tools-b6de0bdd43d53204fbbe9a13d44658963a7f2725.tar.gz
dexon-sol-tools-b6de0bdd43d53204fbbe9a13d44658963a7f2725.tar.bz2
dexon-sol-tools-b6de0bdd43d53204fbbe9a13d44658963a7f2725.tar.lz
dexon-sol-tools-b6de0bdd43d53204fbbe9a13d44658963a7f2725.tar.xz
dexon-sol-tools-b6de0bdd43d53204fbbe9a13d44658963a7f2725.tar.zst
dexon-sol-tools-b6de0bdd43d53204fbbe9a13d44658963a7f2725.zip
Merge branch 'v2-prototype' into update-lerna
* v2-prototype: (48 commits) Update CHANGELOG Rename call data schema id to CallData. Check for TypedArray when hashing data in order-utils crypto Fix broken links in sol-cov documentation Fix 0x.js ts warnings Update yarn.lock Fix 0x.js ts warnings Fix 0x.js tests on CI Fix a bad merge Update package versions Merge Update changelogs Add a test for ERC721 Allowance Use allowance instead of approval for all in fill-scenarios Upgrade sha3 to 1.2.2 to work with node v10 Check if the token doesn't exist before minting in fill scenarios Make downlevelIteration a global config Fix tests descriptions DRY up the code in order-watcher collision-resistant abi decoder Await transactions in fillScenarios Rename decodeAssetData to decodeAssetDataOrThrow ...
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 4a1441474..a891a60d2 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);
assert.assert(isValid, `Expected order with hash '${orderHash}' to have a valid signature`);
},
};