Skip to content

Commit

Permalink
slice array not string
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottyPoi committed Sep 24, 2024
1 parent 2b560ec commit 9d382a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const main = async () => {
if (args.pk === undefined) {
privateKey = await keys.generateKeyPair('secp256k1')
} else {
privateKey = keys.privateKeyFromRaw(hexToBytes('0x' + args.pk.slice(-64)))
privateKey = keys.privateKeyFromRaw(hexToBytes(args.pk).slice(-32))
}
} catch (err: any) {
throw new Error(`Error using pk: ${args.pk}\n${err.message}`)
Expand Down

0 comments on commit 9d382a6

Please sign in to comment.