This commit is contained in:
Believethehype
2023-12-23 17:37:48 +01:00
parent 4aed46de52
commit ef6f9093f7
2 changed files with 7 additions and 7 deletions

View File

@@ -13,7 +13,7 @@ from nostr_dvm.utils.definitions import EventDefinitions
from nostr_dvm.utils.nip89_utils import nip89_fetch_events_pubkey, NIP89Config
from nostr_dvm.utils.nostr_utils import send_event
from nostr_dvm.utils.output_utils import PostProcessFunctionType, post_process_list_to_users, post_process_list_to_events
from nostr_dvm.utils.zap_utils import parse_zap_event_tags, pay_bolt11_ln_bits, zap
from nostr_dvm.utils.zap_utils import parse_zap_event_tags, pay_bolt11_ln_bits, zaprequest
from nostr_dvm.utils.cashu_utils import redeem_cashu
@@ -294,7 +294,7 @@ class Bot:
user = get_or_add_user(db=self.dvm_config.DB, npub=nostr_event.pubkey().to_hex(),
client=self.client, config=self.dvm_config)
print("Paying: " + user.name)
bolt11 = zap(user.lud16, amount, "Zap", nostr_event, self.keys, self.dvm_config,
bolt11 = zaprequest(user.lud16, amount, "Zap", nostr_event, self.keys, self.dvm_config,
"private")
if bolt11 == None:
print("Receiver has no Lightning address")

View File

@@ -18,7 +18,7 @@ from nostr_dvm.utils.mediasource_utils import input_data_file_duration
from nostr_dvm.utils.nostr_utils import get_event_by_id, get_referenced_event_by_id, send_event, check_and_decrypt_tags
from nostr_dvm.utils.output_utils import build_status_reaction
from nostr_dvm.utils.zap_utils import check_bolt11_ln_bits_is_paid, create_bolt11_ln_bits, parse_zap_event_tags, \
parse_amount_from_bolt11_invoice, zap, pay_bolt11_ln_bits
parse_amount_from_bolt11_invoice, zaprequest, pay_bolt11_ln_bits
from nostr_dvm.utils.cashu_utils import redeem_cashu
use_logger = False
@@ -334,8 +334,8 @@ class DVM:
user = get_or_add_user(self.dvm_config.DB, original_event.pubkey().to_hex(),
client=self.client, config=self.dvm_config)
print(user.lud16 + " " + str(amount))
bolt11 = zap(user.lud16, amount, "Couldn't finish job, returning sats", original_event,
self.keys, self.dvm_config, zaptype="private")
bolt11 = zaprequest(user.lud16, amount, "Couldn't finish job, returning sats", original_event,
self.keys, self.dvm_config, zaptype="private")
if bolt11 is None:
print("Receiver has no Lightning address, can't zap back.")
return
@@ -511,8 +511,8 @@ class DVM:
user = get_or_add_user(self.dvm_config.DB, job_event.pubkey().to_hex(),
client=self.client, config=self.dvm_config)
print(user.lud16 + " " + str(amount))
bolt11 = zap(user.lud16, amount, "Couldn't finish job, returning sats", job_event,
self.keys, self.dvm_config, zaptype="private")
bolt11 = zaprequest(user.lud16, amount, "Couldn't finish job, returning sats", job_event,
self.keys, self.dvm_config, zaptype="private")
if bolt11 is None:
print("Receiver has no Lightning address, can't zap back.")
return