diff --git a/pycardano/txbuilder.py b/pycardano/txbuilder.py index bf10d1c4..c8810ae8 100644 --- a/pycardano/txbuilder.py +++ b/pycardano/txbuilder.py @@ -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 ( @@ -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)