From 61c5d4327aecb0cb8c67e96d219256c3bc79e1dc Mon Sep 17 00:00:00 2001 From: KforG Date: Wed, 28 Feb 2024 01:31:14 +0100 Subject: [PATCH] Fix changes in package function --- keyfile/keyfile.go | 4 ++-- wallet/signsend.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyfile/keyfile.go b/keyfile/keyfile.go index e22be77c..70c54463 100644 --- a/keyfile/keyfile.go +++ b/keyfile/keyfile.go @@ -35,7 +35,7 @@ func CreateKeyFile(pass string) error { } // Derive pubkey - _, pub := btcec.PrivKeyFromBytes(btcec.S256(), priv32[:]) + _, pub := btcec.PrivKeyFromBytes(priv32[:]) salt := new([24]byte) // salt for scrypt / nonce for secretbox dk32 := new([32]byte) // derived key from scrypt @@ -131,6 +131,6 @@ func TestPassword(password string) bool { if err != nil { return false } - _, pub := btcec.PrivKeyFromBytes(btcec.S256(), priv) + _, pub := btcec.PrivKeyFromBytes(priv) return bytes.Equal(loadPublicKey(), pub.SerializeCompressed()) } diff --git a/wallet/signsend.go b/wallet/signsend.go index f1d81599..4fa70bb6 100644 --- a/wallet/signsend.go +++ b/wallet/signsend.go @@ -33,7 +33,7 @@ func (w *Wallet) SignMyInputs(tx *wire.MsgTx, password string) error { return err } - priv, _ := btcec.PrivKeyFromBytes(btcec.S256(), privBytes) + priv, _ := btcec.PrivKeyFromBytes(privBytes) for i := range tx.TxIn { sigStash[i], err = txscript.SignatureScript(tx, i, w.Script, txscript.SigHashAll, priv, true)