wallet: allow to sign with encrypted contract-based accounts
This commit is contained in:
parent
881ed3065e
commit
eaf45d243b
1 changed files with 3 additions and 3 deletions
|
@ -96,13 +96,13 @@ func NewAccount() (*Account, error) {
|
|||
|
||||
// SignTx signs transaction t and updates it's Witnesses.
|
||||
func (a *Account) SignTx(net netmode.Magic, t *transaction.Transaction) error {
|
||||
if a.privateKey == nil {
|
||||
return errors.New("account is not unlocked")
|
||||
}
|
||||
if len(a.Contract.Parameters) == 0 {
|
||||
t.Scripts = append(t.Scripts, transaction.Witness{})
|
||||
return nil
|
||||
}
|
||||
if a.privateKey == nil {
|
||||
return errors.New("account is not unlocked")
|
||||
}
|
||||
sign := a.privateKey.SignHashable(uint32(net), t)
|
||||
|
||||
verif := a.GetVerificationScript()
|
||||
|
|
Loading…
Reference in a new issue