From 4eb58a70bb833af6a658c4e047d2a3ece92a5f44 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 30 May 2018 17:54:59 -0700 Subject: Decide to throw for Caller signature type for now --- packages/order-utils/src/signature_utils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/order-utils/src/signature_utils.ts b/packages/order-utils/src/signature_utils.ts index 8cd4264ab..70637e2ac 100644 --- a/packages/order-utils/src/signature_utils.ts +++ b/packages/order-utils/src/signature_utils.ts @@ -34,9 +34,10 @@ export async function isValidSignatureAsync( case SignatureType.Invalid: return false; - // Question: Does it make sense to handle this? case SignatureType.Caller: - return true; + // HACK: We currently do not "validate" the caller signature type. + // It can only be validated during Exchange contract execution. + throw new Error('Caller signature type cannot be validated off-chain'); // TODO: Rename this type to `EthSign` b/c multiple of the signature // types use ECRecover... -- cgit