From 2e05561cd19fd9f68599e521c58fc24cec908976 Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 16 Oct 2024 04:30:27 +0200 Subject: [PATCH] Add node alias to invoice description --- api/logics.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/logics.py b/api/logics.py index 0fda68696..1c4cadfaf 100644 --- a/api/logics.py +++ b/api/logics.py @@ -1402,10 +1402,10 @@ def gen_taker_hold_invoice(cls, order, user): bond_satoshis = int(order.last_satoshis * order.bond_size / 100) pos_text = "Buying" if cls.is_buyer(order, user) else "Selling" if user.robot.wants_stealth: - description = f"Payment reference: {order.reference}. This payment WILL FREEZE IN YOUR WALLET, check on RoboSats if the lock was successful. It will be unlocked (fail) unless you cheat or cancel unilaterally." + description = f"{config("NODE_ALIAS")} - Payment reference: {order.reference}. This payment WILL FREEZE IN YOUR WALLET, check on RoboSats if the lock was successful. It will be unlocked (fail) unless you cheat or cancel unilaterally." else: description = ( - f"RoboSats - Taking 'Order {order.id}' {pos_text} BTC for {str(float(order.amount)) + Currency.currency_dict[str(order.currency.currency)]}" + f"{config("NODE_ALIAS")} - Taking 'Order {order.id}' {pos_text} BTC for {str(float(order.amount)) + Currency.currency_dict[str(order.currency.currency)]}" + " - Taker bond - This payment WILL FREEZE IN YOUR WALLET, check on RoboSats if the lock was successful. It will be unlocked (fail) unless you cheat or cancel unilaterally." ) @@ -1501,9 +1501,9 @@ def gen_escrow_hold_invoice(cls, order, user): order.log(f"Escrow invoice amount is calculated as {escrow_satoshis} Sats") if user.robot.wants_stealth: - description = f"Payment reference: {order.reference}. This payment WILL FREEZE IN YOUR WALLET, check on RoboSats if the lock was successful. It will be unlocked (fail) unless you cheat or cancel unilaterally." + description = f"{config("NODE_ALIAS")} - Payment reference: {order.reference}. This payment WILL FREEZE IN YOUR WALLET, check on RoboSats if the lock was successful. It will be unlocked (fail) unless you cheat or cancel unilaterally." else: - description = f"RoboSats - Escrow amount for '{str(order)}' - It WILL FREEZE IN YOUR WALLET. It will be released to the buyer once you confirm you received the fiat. It will automatically return if buyer does not confirm the payment." + description = f"{config("NODE_ALIAS")} - Escrow amount for '{str(order)}' - It WILL FREEZE IN YOUR WALLET. It will be released to the buyer once you confirm you received the fiat. It will automatically return if buyer does not confirm the payment." # Gen hold Invoice try: