aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/utils.ts15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/utils/utils.ts b/src/utils/utils.ts
index ea3d8c7e1..ded2d31fd 100644
--- a/src/utils/utils.ts
+++ b/src/utils/utils.ts
@@ -51,21 +51,6 @@ export const utils = {
const hashHex = ethUtil.bufferToHex(hashBuff);
return hashHex;
},
- isValidSignature(dataHex: string, signature: ECSignature, signerAddressHex: string): boolean {
- const dataBuff = ethUtil.toBuffer(dataHex);
- const msgHashBuff = ethUtil.hashPersonalMessage(dataBuff);
- try {
- const pubKey = ethUtil.ecrecover(
- msgHashBuff,
- signature.v,
- ethUtil.toBuffer(signature.r),
- ethUtil.toBuffer(signature.s));
- const retrievedAddress = ethUtil.bufferToHex(ethUtil.pubToAddress(pubKey));
- return retrievedAddress === signerAddressHex;
- } catch (err) {
- return false;
- }
- },
getCurrentUnixTimestamp(): BigNumber.BigNumber {
return new BigNumber(Date.now() / 1000);
},