diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-03-10 07:47:21 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-21 04:56:16 +0800 |
commit | 6db0b2e39821f27f6f31a8247159864dacd1d2bd (patch) | |
tree | be4b6b6cc5cb098446a3a82016931173642faf5b /packages/contracts/src/utils/signing_utils.ts | |
parent | 2bd1ddd1296b4b3706bf91934e00c02508ca7c6f (diff) | |
download | dexon-0x-contracts-6db0b2e39821f27f6f31a8247159864dacd1d2bd.tar.gz dexon-0x-contracts-6db0b2e39821f27f6f31a8247159864dacd1d2bd.tar.zst dexon-0x-contracts-6db0b2e39821f27f6f31a8247159864dacd1d2bd.zip |
Address feedback and lint
Diffstat (limited to 'packages/contracts/src/utils/signing_utils.ts')
-rw-r--r-- | packages/contracts/src/utils/signing_utils.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/contracts/src/utils/signing_utils.ts b/packages/contracts/src/utils/signing_utils.ts index 21b69619c..61ab1f138 100644 --- a/packages/contracts/src/utils/signing_utils.ts +++ b/packages/contracts/src/utils/signing_utils.ts @@ -3,10 +3,10 @@ import * as ethUtil from 'ethereumjs-util'; import { SignatureType } from './types'; export const signingUtils = { - signMessage(message: Buffer, secretKey: Buffer, signatureType: SignatureType): Buffer { + signMessage(message: Buffer, privateKey: Buffer, signatureType: SignatureType): Buffer { if (signatureType === SignatureType.Ecrecover) { const prefixedMessage = ethUtil.hashPersonalMessage(message); - const ecSignature = ethUtil.ecsign(prefixedMessage, secretKey); + const ecSignature = ethUtil.ecsign(prefixedMessage, privateKey); const signature = Buffer.concat([ ethUtil.toBuffer(signatureType), ethUtil.toBuffer(ecSignature.v), @@ -15,7 +15,7 @@ export const signingUtils = { ]); return signature; } else if (signatureType === SignatureType.EIP712) { - const ecSignature = ethUtil.ecsign(message, secretKey); + const ecSignature = ethUtil.ecsign(message, privateKey); const signature = Buffer.concat([ ethUtil.toBuffer(signatureType), ethUtil.toBuffer(ecSignature.v), |