Skip to content

Commit

Permalink
Set empty vkey witness to None when empty
Browse files Browse the repository at this point in the history
  • Loading branch information
theeldermillenial committed Sep 22, 2024
1 parent 9094f5e commit 85b703b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pycardano/txbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import Dict, List, Optional, Set, Tuple, Union

from pycardano import RedeemerMap
from pycardano import witness
from pycardano.address import Address, AddressType
from pycardano.backend.base import ChainContext
from pycardano.certificate import (
Expand Down Expand Up @@ -1508,4 +1509,7 @@ def build_and_sign(
VerificationKeyWitness(signing_key.to_verification_key(), signature)
)

if len(witness_set.vkey_witnesses) == 0:
witness_set.vkey_witnesses = None

return Transaction(tx_body, witness_set, auxiliary_data=self.auxiliary_data)

0 comments on commit 85b703b

Please sign in to comment.