From 97e0ea9c8e2979c129d7df92c172787efa94c69f Mon Sep 17 00:00:00 2001 From: Believethehype <1097224+believethehype@users.noreply.github.com> Date: Tue, 2 Apr 2024 23:11:29 +0200 Subject: [PATCH] Update subscription.py --- nostr_dvm/subscription.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nostr_dvm/subscription.py b/nostr_dvm/subscription.py index bfee47a..26758d3 100644 --- a/nostr_dvm/subscription.py +++ b/nostr_dvm/subscription.py @@ -162,7 +162,7 @@ class Subscription: name, nip05, lud16 = fetch_user_metadata(zap[1], self.client) splitted_amount = math.floor( - (int(zap[1]) / overallsplit) * int(overall_amount) / 1000) + (int(zap[3]) / overallsplit) * int(overall_amount) / 1000) # invoice = create_bolt11_lud16(lud16, splitted_amount) # TODO add details about DVM in message @@ -324,7 +324,7 @@ class Subscription: keys = Keys.parse(dvm_config.PRIVATE_KEY) - message = ("Subscribed to DVM " + subscription.tier + ". Renewing on: " + str( + message = ("Subscribed to DVM " + tier + ". Renewing on: " + str( Timestamp.from_secs(end).to_human_datetime().replace("Z", " ").replace("T", " "))) evt = EventBuilder.encrypted_direct_msg(keys, PublicKey.parse(subscription.subscriber), message, None).to_event(keys) @@ -386,7 +386,7 @@ class Subscription: print("updated subscription entry") - + keys = Keys.parse(dvm_config.PRIVATE_KEY) message = ("Renewed Subscription to DVM " + subscription.tier + ". Next renewal: " + str( Timestamp.from_secs(end).to_human_datetime().replace("Z", " ").replace( "T", " ")))