From 189fa0038ba07e237781c61af769ac77704023e4 Mon Sep 17 00:00:00 2001 From: Saurabh Singh Date: Fri, 4 Oct 2024 15:34:06 +0530 Subject: [PATCH] Add fix for quality check Signed-off-by: Saurabh Singh --- tests/types/keypair/private_key_test.go | 2 +- types/keypair/private_key.go | 2 +- types/keypair/secp256k1/hex_parser.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/types/keypair/private_key_test.go b/tests/types/keypair/private_key_test.go index 6de4854..21f6510 100644 --- a/tests/types/keypair/private_key_test.go +++ b/tests/types/keypair/private_key_test.go @@ -118,4 +118,4 @@ func Test_NewPrivateKeyFromHex(t *testing.T) { assert.Error(t, err) assert.Contains(t, err.Error(), "failed to create private key") }) -} \ No newline at end of file +} diff --git a/types/keypair/private_key.go b/types/keypair/private_key.go index 5203c10..7d0a668 100644 --- a/types/keypair/private_key.go +++ b/types/keypair/private_key.go @@ -142,4 +142,4 @@ func NewPrivateKeyFromHex(key string, algorithm keyAlgorithm) (PrivateKey, error pub: publicKey, priv: priv, }, nil -} \ No newline at end of file +} diff --git a/types/keypair/secp256k1/hex_parser.go b/types/keypair/secp256k1/hex_parser.go index dfd31b9..9aac1bf 100644 --- a/types/keypair/secp256k1/hex_parser.go +++ b/types/keypair/secp256k1/hex_parser.go @@ -33,6 +33,6 @@ func NewPrivateKeyFromHex(key string) (PrivateKey, error) { if err != nil { return PrivateKey{}, fmt.Errorf("failed to decode hex: %v", err) } - + return NewPrivateKeyFromBytes(b) }