aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils/src/signature_utils.ts
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-08-25 04:11:17 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-08-25 05:40:00 +0800
commit1932aff35c6b07093534cde66dec63c5f919fcf0 (patch)
treefa886f0d47c46ddf27b85d920a6f719ba26256ba /packages/order-utils/src/signature_utils.ts
parent4f27991959ba6e4e15839e6195a40b0fd8a2122c (diff)
downloaddexon-0x-contracts-1932aff35c6b07093534cde66dec63c5f919fcf0.tar.gz
dexon-0x-contracts-1932aff35c6b07093534cde66dec63c5f919fcf0.tar.zst
dexon-0x-contracts-1932aff35c6b07093534cde66dec63c5f919fcf0.zip
Remove Trezor SignatureType
Diffstat (limited to 'packages/order-utils/src/signature_utils.ts')
-rw-r--r--packages/order-utils/src/signature_utils.ts12
1 files changed, 1 insertions, 11 deletions
diff --git a/packages/order-utils/src/signature_utils.ts b/packages/order-utils/src/signature_utils.ts
index f8ed9cf9c..23577efdc 100644
--- a/packages/order-utils/src/signature_utils.ts
+++ b/packages/order-utils/src/signature_utils.ts
@@ -77,12 +77,6 @@ export const signatureUtils = {
return signatureUtils.isValidPresignedSignatureAsync(provider, data, signerAddress);
}
- case SignatureType.Trezor: {
- const prefixedMessageHex = signatureUtils.addSignedMessagePrefix(data, SignerType.Trezor);
- const ecSignature = signatureUtils.parseECSignature(signature);
- return signatureUtils.isValidECSignature(prefixedMessageHex, ecSignature, signerAddress);
- }
-
default:
throw new Error(`Unhandled SignatureType: ${signatureTypeIndexIfExists}`);
}
@@ -288,10 +282,6 @@ export const signatureUtils = {
signatureType = SignatureType.EthSign;
break;
}
- case SignerType.Trezor: {
- signatureType = SignatureType.Trezor;
- break;
- }
default:
throw new Error(`Unrecognized SignerType: ${signerType}`);
}
@@ -345,7 +335,7 @@ export const signatureUtils = {
*/
parseECSignature(signature: string): ECSignature {
assert.isHexString('signature', signature);
- const ecSignatureTypes = [SignatureType.EthSign, SignatureType.EIP712, SignatureType.Trezor];
+ const ecSignatureTypes = [SignatureType.EthSign, SignatureType.EIP712];
assert.isOneOfExpectedSignatureTypes(signature, ecSignatureTypes);
// tslint:disable-next-line:custom-no-magic-numbers