[#652] Update Neo Go to v0.95.3
Add `keys.NEP2ScryptParams()` to `keys.NEP2Decrypt` call arguments. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
4eca4dc527
commit
dab33e0f9b
4 changed files with 5 additions and 4 deletions
|
@ -214,7 +214,7 @@ func getKeyFromNEP2(encryptedWif string) (*ecdsa.PrivateKey, error) {
|
|||
return nil, errInvalidPassword
|
||||
}
|
||||
|
||||
k, err := keys.NEP2Decrypt(encryptedWif, pass)
|
||||
k, err := keys.NEP2Decrypt(encryptedWif, pass, keys.NEP2ScryptParams())
|
||||
if err != nil {
|
||||
printVerbose("Invalid key or password: %v", err)
|
||||
return nil, errInvalidPassword
|
||||
|
@ -247,7 +247,7 @@ func getKeyFromWallet(w *wallet.Wallet, addrStr string) (*ecdsa.PrivateKey, erro
|
|||
return nil, errInvalidPassword
|
||||
}
|
||||
|
||||
if err := acc.Decrypt(pass); err != nil {
|
||||
if err := acc.Decrypt(pass, keys.NEP2ScryptParams()); err != nil {
|
||||
printVerbose("Can't decrypt account: %v", err)
|
||||
return nil, errInvalidPassword
|
||||
}
|
||||
|
|
2
go.mod
2
go.mod
|
@ -11,7 +11,7 @@ require (
|
|||
github.com/mr-tron/base58 v1.2.0
|
||||
github.com/multiformats/go-multiaddr v0.3.2
|
||||
github.com/nspcc-dev/hrw v1.0.9
|
||||
github.com/nspcc-dev/neo-go v0.95.2
|
||||
github.com/nspcc-dev/neo-go v0.95.3
|
||||
github.com/nspcc-dev/neofs-api-go v1.27.2-0.20210623145243-07fcaa4ba5cc
|
||||
github.com/nspcc-dev/neofs-sdk-go v0.0.0-20210520210714-9dee13f0d556
|
||||
github.com/nspcc-dev/tzhash v1.4.0
|
||||
|
|
BIN
go.sum
BIN
go.sum
Binary file not shown.
|
@ -3,6 +3,7 @@ package config
|
|||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
"github.com/nspcc-dev/neo-go/pkg/encoding/address"
|
||||
"github.com/nspcc-dev/neo-go/pkg/wallet"
|
||||
)
|
||||
|
@ -26,7 +27,7 @@ func LoadAccount(path, addr, password string) (*wallet.Account, error) {
|
|||
return nil, errors.New("account is missing")
|
||||
}
|
||||
|
||||
if err := acc.Decrypt(password); err != nil {
|
||||
if err := acc.Decrypt(password, keys.NEP2ScryptParams()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue