From eaeb7c6a4dada67b44535e7eaeaf697d8d0c949c Mon Sep 17 00:00:00 2001 From: subnix Date: Thu, 30 May 2024 13:33:55 +0400 Subject: [PATCH] fix(keystore): support for build without cgo --- pkg/keystore/recover.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/keystore/recover.go b/pkg/keystore/recover.go index ae274bcd..2c71f5ed 100644 --- a/pkg/keystore/recover.go +++ b/pkg/keystore/recover.go @@ -4,7 +4,8 @@ package keystore import ( - "github.com/ethereum/go-ethereum/crypto/secp256k1" + "github.com/ethereum/go-ethereum/crypto" + "github.com/fbsobreira/gotron-sdk/pkg/address" ) @@ -14,7 +15,7 @@ func RecoverPubkey(hash []byte, signature []byte) (address.Address, error) { signature[64] -= 27 } - sigPublicKey, err := secp256k1.RecoverPubkey(hash, signature) + sigPublicKey, err := crypto.Ecrecover(hash, signature) if err != nil { return nil, err }