From 6cd8c8782e3f063706f5b859673fde7fa93ba07a Mon Sep 17 00:00:00 2001 From: Ivan Lagunovsky Date: Sat, 11 May 2024 23:17:26 +0200 Subject: [PATCH] feat(taiko-client,proposer): ability to use a private key both with and without the hex prefix --- packages/taiko-client/proposer/config.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/taiko-client/proposer/config.go b/packages/taiko-client/proposer/config.go index 50eee5da2b3..54e75f5fabe 100644 --- a/packages/taiko-client/proposer/config.go +++ b/packages/taiko-client/proposer/config.go @@ -55,9 +55,7 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { return nil, fmt.Errorf("invalid JWT secret file: %w", err) } - l1ProposerPrivKey, err := crypto.ToECDSA( - common.Hex2Bytes(c.String(flags.L1ProposerPrivKey.Name)), - ) + l1ProposerPrivKey, err := crypto.ToECDSA(common.FromHex(c.String(flags.L1ProverPrivKey.Name))) if err != nil { return nil, fmt.Errorf("invalid L1 proposer private key: %w", err) }