Skip to content

Commit bfa1773

Browse files
committed
Fix in case of None mint
1 parent 9a4f040 commit bfa1773

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pycardano/txbuilder.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -953,12 +953,13 @@ def build(
953953
for o in self.outputs:
954954
requested_amount += o.amount
955955

956-
for pid, m in self.mint.items():
957-
for tkn, am in m.items():
958-
if am < 0:
959-
requested_amount += Value(
960-
multi_asset=MultiAsset({pid: Asset({tkn: -am})})
961-
)
956+
if self.mint:
957+
for pid, m in self.mint.items():
958+
for tkn, am in m.items():
959+
if am < 0:
960+
requested_amount += Value(
961+
multi_asset=MultiAsset({pid: Asset({tkn: -am})})
962+
)
962963

963964
# Include min fees associated as part of requested amount
964965
requested_amount += self._estimate_fee()

0 commit comments

Comments
 (0)