File tree 1 file changed +10
-8
lines changed 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -183,19 +183,21 @@ def _random_select_subset(
183
183
@staticmethod
184
184
def _split_by_asset (value : Value ) -> List [Value ]:
185
185
# Extract ADA
186
- assets = [Value (value .coin )]
186
+ assets = [Value (value .coin )] if value . coin else []
187
187
188
188
# Extract native assets
189
- for policy_id , policy_id_dict in value .multi_asset .items ():
190
- for asset_name , amount in policy_id_dict .items ():
189
+ for policy_id , d in value .multi_asset .items ():
190
+ for asset_name , amount in d .items ():
191
191
if not amount :
192
192
# skip 0 amounts
193
193
continue
194
- value = Value .from_primitive (
195
- [
196
- 0 ,
197
- {policy_id .payload : {asset_name .payload : amount }},
198
- ]
194
+ assets .append (
195
+ Value .from_primitive (
196
+ [
197
+ 0 ,
198
+ {policy_id .payload : {asset_name .payload : amount }},
199
+ ]
200
+ )
199
201
)
200
202
assets .append (value )
201
203
You can’t perform that action at this time.
0 commit comments