Skip to content

Commit 1c3b269

Browse files
committed
fix(faucet): allow None as amount parameter
Updated the `fund_from_faucet` function to accept `None` as a valid value for the `amount` parameter. If `amount` is `None`, it defaults to 1,000,000,000. This change ensures better flexibility in specifying the amount to be funded from the faucet.
1 parent b166964 commit 1c3b269

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cardano_node_tests/utils/faucet.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ def fund_from_faucet(
1818
cluster_obj: clusterlib.ClusterLib,
1919
faucet_data: tp.Optional[dict] = None,
2020
all_faucets: tp.Optional[tp.Dict[str, dict]] = None,
21-
amount: tp.Union[int, tp.List[int]] = 1000_000_000,
21+
amount: tp.Union[None, int, tp.List[int]] = None,
2222
tx_name: tp.Optional[str] = None,
2323
destination_dir: clusterlib.FileType = ".",
2424
force: bool = False,
2525
) -> tp.Optional[clusterlib.TxRawOutput]:
2626
"""Send `amount` from faucet addr to all `dst_addrs`."""
27+
if amount is None:
28+
amount = 1000_000_000
29+
2730
if not (faucet_data or all_faucets):
2831
msg = "Either `faucet_data` or `all_faucets` must be provided."
2932
raise AssertionError(msg)

0 commit comments

Comments
 (0)