*: do not get private key from Account to check if it CanSign()

We have this API now to performs checks.
This commit is contained in:
Roman Khimov 2022-09-01 17:54:00 +03:00
parent 8d33206bb8
commit fd8da6fdb9
4 changed files with 4 additions and 4 deletions

View file

@ -377,7 +377,7 @@ func (s *service) getKeyPair(pubs []crypto.PublicKey) (int, crypto.PrivateKey, c
continue
}
if acc.PrivateKey() == nil {
if !acc.CanSign() {
err := acc.Decrypt(s.Config.Wallet.Password, s.wallet.Scrypt)
if err != nil {
s.log.Fatal("can't unlock account", zap.String("address", address.Uint160ToString(sh)))