Skip to content

Commit 9e15666

Browse files
committed
fix: ensure correct byte length handling in numToNByteStr function
1 parent ec41e60 commit 9e15666

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/pkp-sui/src/lib/pkp-sui.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export class PKPSuiWallet implements PKPWallet, Signer {
7878
const msgHash = sha256(digest);
7979
const signature = await this.runSign(msgHash);
8080
const numToNByteStr = (num: number | bigint): string =>
81-
bytesToHex(numberToBytesBE(num, secp256k1.CURVE.nByteLength));
81+
bytesToHex(numberToBytesBE(num, secp256k1.CURVE.nByteLength || 32));
8282

8383
// TODO response from PKPBase.runSign has this values defined as strings
8484
const compactHex =

0 commit comments

Comments
 (0)