aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-05-31 08:54:59 +0800
committerFabio Berger <me@fabioberger.com>2018-05-31 08:54:59 +0800
commit4eb58a70bb833af6a658c4e047d2a3ece92a5f44 (patch)
tree0f7556e936fac67c38347e847bd586458c3dbd99
parent9200ed2216688410a95175bab460d262fc52a591 (diff)
downloaddexon-sol-tools-4eb58a70bb833af6a658c4e047d2a3ece92a5f44.tar
dexon-sol-tools-4eb58a70bb833af6a658c4e047d2a3ece92a5f44.tar.gz
dexon-sol-tools-4eb58a70bb833af6a658c4e047d2a3ece92a5f44.tar.bz2
dexon-sol-tools-4eb58a70bb833af6a658c4e047d2a3ece92a5f44.tar.lz
dexon-sol-tools-4eb58a70bb833af6a658c4e047d2a3ece92a5f44.tar.xz
dexon-sol-tools-4eb58a70bb833af6a658c4e047d2a3ece92a5f44.tar.zst
dexon-sol-tools-4eb58a70bb833af6a658c4e047d2a3ece92a5f44.zip
Decide to throw for Caller signature type for now
-rw-r--r--packages/order-utils/src/signature_utils.ts5
1 files 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...