File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ def min_lovelace(
103
103
Returns:
104
104
int: Minimum required lovelace amount for this transaction output.
105
105
"""
106
- if isinstance (amount , int ):
106
+ if isinstance (amount , int ) or not amount . multi_asset :
107
107
return context .protocol_param .min_utxo
108
108
109
109
b_size = bundle_size (amount .multi_asset )
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ def test_min_lovelace_ada_only(chain_context):
10
10
assert min_lovelace (2000000 , chain_context ) == chain_context .protocol_param .min_utxo
11
11
12
12
13
+ def test_min_lovelace_ada_only_2 (chain_context ):
14
+ assert min_lovelace (Value (2000000 ), chain_context ) == chain_context .protocol_param .min_utxo
15
+
16
+
13
17
class TestMinLoveLaceMultiAsset :
14
18
15
19
# Tests copied from: https://github.com/input-output-hk/cardano-ledger/blob/master/doc/explanations/min-utxo-alonzo.rst#example-min-ada-value-calculations-and-current-constants
You can’t perform that action at this time.
0 commit comments