Skip to content

Commit

Permalink
fix(keystore): support for build without cgo
Browse files Browse the repository at this point in the history
  • Loading branch information
subnix committed May 30, 2024
1 parent 1e82440 commit 9676b57
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/keystore/recover.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand All @@ -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
}
Expand Down

0 comments on commit 9676b57

Please sign in to comment.