mirror of
https://github.com/aljazceru/nostrdvm.git
synced 2026-01-22 23:44:22 +01:00
renaming, fixes, client with opts
This commit is contained in:
@@ -83,12 +83,12 @@ def check_task_is_supported(event, client, get_duration=False, config=None):
|
||||
print("Output format not supported, skipping..")
|
||||
return False, "", 0
|
||||
|
||||
for dvm in dvm_config.SUPPORTED_TASKS:
|
||||
for dvm in dvm_config.SUPPORTED_DVMS:
|
||||
if dvm.TASK == task:
|
||||
if not dvm.is_input_supported(input_type, event.content()):
|
||||
return False, task, duration
|
||||
|
||||
if task not in (x.TASK for x in dvm_config.SUPPORTED_TASKS):
|
||||
if task not in (x.TASK for x in dvm_config.SUPPORTED_DVMS):
|
||||
return False, task, duration
|
||||
|
||||
return True, task, duration
|
||||
@@ -118,7 +118,7 @@ def check_url_is_readable(url):
|
||||
|
||||
|
||||
def get_amount_per_task(task, dvm_config, duration=1):
|
||||
for dvm in dvm_config.SUPPORTED_TASKS: #this is currently just one
|
||||
for dvm in dvm_config.SUPPORTED_DVMS: #this is currently just one
|
||||
if dvm.TASK == task:
|
||||
amount = dvm.COST * duration
|
||||
return amount
|
||||
|
||||
@@ -4,14 +4,14 @@ from utils.nip89_utils import NIP89Announcement
|
||||
|
||||
|
||||
class DVMConfig:
|
||||
SUPPORTED_TASKS = []
|
||||
SUPPORTED_DVMS= []
|
||||
PRIVATE_KEY: str = os.getenv("NOSTR_PRIVATE_KEY")
|
||||
|
||||
RELAY_LIST = ["wss://relay.damus.io", "wss://nostr-pub.wellorder.net", "wss://nos.lol", "wss://nostr.wine",
|
||||
"wss://relay.nostfiles.dev", "wss://nostr.mom", "wss://nostr.oxtr.dev", "wss://relay.nostr.bg",
|
||||
"wss://relay.f7z.io"]
|
||||
|
||||
RELAY_TIMEOUT = 5
|
||||
RELAY_TIMEOUT = 3
|
||||
LNBITS_INVOICE_KEY = ''
|
||||
LNBITS_URL = 'https://lnbits.com'
|
||||
DB: str
|
||||
|
||||
Reference in New Issue
Block a user