Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch release v1.5.0.2 #210

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion electrumx/lib/atomicals_blueprint_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@ def custom_color_ft_atomicals(cls, ft_atomicals, operations_found_at_inputs, tx)
output_colored_map = {}
fts_burned = {}
cleanly_assigned = True
first_atomical_id = None
for atomical_id, atomical_info in sorted(ft_atomicals.items()):
remaining_value = atomical_info.atomical_value
for out_idx, txout in enumerate(tx.outputs):
Expand Down Expand Up @@ -598,7 +599,12 @@ def custom_color_ft_atomicals(cls, ft_atomicals, operations_found_at_inputs, tx)
if remaining_value > 0:
cleanly_assigned = False
fts_burned[atomical_id] = remaining_value
return AtomicalFtOutputBlueprintAssignmentSummary(output_colored_map, fts_burned, cleanly_assigned, None)

if output_colored_map and len(output_colored_map.keys()):
first_atomical_id = list(list(output_colored_map.values())[0]["atomicals"].keys())[0]
return AtomicalFtOutputBlueprintAssignmentSummary(
output_colored_map, fts_burned, cleanly_assigned, first_atomical_id
)

@classmethod
def color_ft_atomicals_split(cls, ft_atomicals, operations_found_at_inputs, tx, is_custom_coloring_activated):
Expand Down
1 change: 1 addition & 0 deletions tests/lib/test_atomicals_blueprint_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1598,6 +1598,7 @@ def mock_mint_fetcher(self, atomical_id):
nft_output_blueprint = blueprint_builder.get_nft_output_blueprint()
assert len(nft_output_blueprint.outputs) == 0
ft_output_blueprint = blueprint_builder.get_ft_output_blueprint()
assert ft_output_blueprint.first_atomical_id == subject_atomical_id
assert ft_output_blueprint.cleanly_assigned == False
assert len(ft_output_blueprint.outputs) == 2
assert ft_output_blueprint.fts_burned == {}
Expand Down
Loading