aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/utils/signature_utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/0x.js/src/utils/signature_utils.ts')
-rw-r--r--packages/0x.js/src/utils/signature_utils.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/0x.js/src/utils/signature_utils.ts b/packages/0x.js/src/utils/signature_utils.ts
index aaf04e7b0..b0f1d61ef 100644
--- a/packages/0x.js/src/utils/signature_utils.ts
+++ b/packages/0x.js/src/utils/signature_utils.ts
@@ -1,6 +1,6 @@
import * as ethUtil from 'ethereumjs-util';
-import {ECSignature} from '../types';
+import { ECSignature } from '../types';
export const signatureUtils = {
isValidSignature(data: string, signature: ECSignature, signerAddress: string): boolean {
@@ -11,7 +11,8 @@ export const signatureUtils = {
msgHashBuff,
signature.v,
ethUtil.toBuffer(signature.r),
- ethUtil.toBuffer(signature.s));
+ ethUtil.toBuffer(signature.s),
+ );
const retrievedAddress = ethUtil.bufferToHex(ethUtil.pubToAddress(pubKey));
return retrievedAddress === signerAddress;
} catch (err) {
@@ -34,7 +35,7 @@ export const signatureUtils = {
return ecSignature;
},
parseSignatureHexAsRSV(signatureHex: string): ECSignature {
- const {v, r, s} = ethUtil.fromRpcSig(signatureHex);
+ const { v, r, s } = ethUtil.fromRpcSig(signatureHex);
const ecSignature: ECSignature = {
v,
r: ethUtil.bufferToHex(r),