mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 11:41:48 +00:00
wallet: provide (*Account).SignHashable API
Make PrivateKey() less used and less useful.
This commit is contained in:
parent
e569edc841
commit
e164625a7f
10 changed files with 24 additions and 16 deletions
|
@ -58,8 +58,7 @@ func signStoredTransaction(ctx *cli.Context) error {
|
|||
}
|
||||
|
||||
if acc.CanSign() {
|
||||
priv := acc.PrivateKey()
|
||||
sign := priv.SignHashable(uint32(pc.Network), pc.Verifiable)
|
||||
sign := acc.SignHashable(pc.Network, pc.Verifiable)
|
||||
if err := pc.AddSignature(ch, acc.Contract, acc.PublicKey(), sign); err != nil {
|
||||
return cli.NewExitError(fmt.Errorf("can't add signature: %w", err), 1)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue