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

Fix key error when getting subname status #127

Merged
merged 1 commit into from
Feb 19, 2024
Merged
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
6 changes: 3 additions & 3 deletions electrumx/lib/util_atomicals.py
Original file line number Diff line number Diff line change
Expand Up @@ -1598,7 +1598,7 @@ def get_subname_request_candidate_status(current_height, atomical_info, status,
'note': 'The current Atomical should not have been classified as the sub-type.'
}

payment_type = current_candidate_atomical['payment_type']
payment_type = current_candidate_atomical.get('payment_type')
# Catch the scenario where it was not parent initiated, but there also was no valid applicable rule
if payment_type and current_candidate_atomical.get('applicable_rule') is None:
return {
Expand Down Expand Up @@ -1633,7 +1633,7 @@ def get_subname_request_candidate_status(current_height, atomical_info, status,
}

payment = current_candidate_atomical.get('payment')
payment_due_no_later_than_height = current_candidate_atomical['payment_due_no_later_than_height']
payment_due_no_later_than_height = current_candidate_atomical.get('payment_due_no_later_than_height')
# The scenario where there is an applicable rule, but the payment was not received in time
if payment_type == 'applicable_rule' and payment is None and current_height > payment_due_no_later_than_height:
return {
Expand Down Expand Up @@ -1911,4 +1911,4 @@ def check_validate_proof(target_hash, proof):
if check_validate_proof(target_hash, proof):
return True, concat_str4, target_hash

return False, None, None
return False, None, None