small fixes

This commit is contained in:
Believethehype 2024-02-20 10:00:52 +01:00
parent 046bd3de67
commit a2d52a5476
2 changed files with 6 additions and 3 deletions

View File

@ -449,7 +449,7 @@ class DVM:
status == "processing" and not is_paid)
or (status == "success" and not is_paid)):
if dvm_config.LNBITS_INVOICE_KEY != "":
if dvm_config.LNBITS_INVOICE_KEY != "" and bolt11 is not None:
amount_tag = Tag.parse(["amount", str(amount * 1000), bolt11])
else:
amount_tag = Tag.parse(["amount", str(amount * 1000)]) # to millisats

View File

@ -115,8 +115,11 @@ class AdvancedSearchWine(DVMTaskInterface):
data = ob['data']
result_list = []
for el in data:
e_tag = Tag.parse(["e", el['id']])
result_list.append(e_tag.as_vec())
try:
e_tag = Tag.parse(["e", el['id']])
result_list.append(e_tag.as_vec())
except Exception as e:
print("ERROR: " + str(e))
return json.dumps(result_list)