From f561a1a02021c27870bf073cbacd6432ed11da7b Mon Sep 17 00:00:00 2001 From: dhrubabasu <7675102+dhrubabasu@users.noreply.github.com> Date: Sat, 17 Feb 2024 19:23:34 -0500 Subject: [PATCH] chore: cleanup --- src/crypto/bls.spec.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/crypto/bls.spec.ts b/src/crypto/bls.spec.ts index 42bddaaf2..b5c1e7d08 100644 --- a/src/crypto/bls.spec.ts +++ b/src/crypto/bls.spec.ts @@ -1,5 +1,4 @@ import { stringToBytes } from '@scure/base'; -import { bytesToHex } from '@noble/hashes/utils'; import { hexToBuffer } from '../utils/buffer'; import * as bls from './bls'; @@ -33,7 +32,7 @@ describe('bls', () => { it('generates signature correctly', async () => { const sk = bls.secretKeyFromBytes(skStr); - expect(bytesToHex(bls.sign(msg, sk))).toEqual(sigStr); + expect(bls.sign(msg, sk)).toEqual(hexToBuffer(sigStr)); }); it('verifies signature correctly', async () => { @@ -48,7 +47,7 @@ describe('bls', () => { const pk = bls.publicKeyFromBytes(pkStr); const pkBytes = bls.publicKeyToBytes(pk); - expect(bytesToHex(bls.signProofOfPossession(pkBytes, sk))).toEqual(popStr); + expect(bls.signProofOfPossession(pkBytes, sk)).toEqual(hexToBuffer(popStr)); }); it('verifies proof of possession correctly', async () => {