aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/utils/signing_utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/src/utils/signing_utils.ts')
-rw-r--r--packages/contracts/src/utils/signing_utils.ts6
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),