diff --git a/hds.py b/hds.py index 3dd4b39..cca0689 100644 --- a/hds.py +++ b/hds.py @@ -507,7 +507,7 @@ def poc_receipts_v1(activity): valid_text = "💩 Invalid" time = nice_date(activity["time"]) - txn_link = helium_explorer_tx + activity["hash"] + txn_link = f'[🔎](<{helium_explorer_tx}{activity["hash"]}>)' witnesses = {} wit_count = 0 @@ -521,7 +521,7 @@ def poc_receipts_v1(activity): # challenge accepted if "challenger" in activity and activity["challenger"] == config["hotspot"]: output_message.append( - f"🏁 ...Challenged Beaconer, {wit_text} `{time}` [🔎](<{txn_link}>)" + f"🏁 ...Challenged Beaconer, {wit_text} `{time}` {txn_link}" ) # beacon sent @@ -540,7 +540,7 @@ def poc_receipts_v1(activity): if valid_wit_count == len(witnesses): valid_wit_count = "All" msg += f", {valid_wit_count} Valid" - msg += f" `{time}` [🔎](<{txn_link}>)" + msg += f" `{time}` {txn_link}" output_message.append(msg) @@ -570,14 +570,14 @@ def poc_receipts_v1(activity): witness_info += f", {vw} Valid" output_message.append( - f"{valid_text} Witness{witness_info} `{time}` [🔎](<{txn_link}>)" + f"{valid_text} Witness{witness_info} `{time}` {txn_link}" ) # other else: ac_type = activity["type"] output_message.append( - f"🏁 poc_receipts_v1 - {ac_type.upper()} `{time}` [🔎](<{txn_link}>)" + f"🏁 poc_receipts_v1 - {ac_type.upper()} `{time}` {txn_link}" ) @@ -603,7 +603,7 @@ def loop_activities(): # activity time time = nice_date(activity["time"]) - txn_link = helium_explorer_tx + activity["hash"] + txn_link = f'[🔎](<{helium_explorer_tx}{activity["hash"]}>)' # reward if activity["type"] == "rewards_v2": @@ -611,20 +611,20 @@ def loop_activities(): rew = reward_short_name(reward["type"]) amt = nice_hnt_amount_or_seconds(reward["amount"]) output_message.append( - f"🍪 Reward 🥓{amt}, {rew} `{time}` [🔎](<{txn_link}>)" + f"🍪 Reward 🥓{amt}, {rew} `{time}` {txn_link}" ) # transferred data elif activity["type"] == "state_channel_close_v1": for summary in activity["state_channel"]["summaries"]: packet_plural = "s" if summary["num_packets"] != 1 else "" output_message.append( - f"🚛 Transferred {summary['num_packets']} Packet{packet_plural} ({summary['num_dcs']} DC) `{time}` [🔎](<{txn_link}>)" + f"🚛 Transferred {summary['num_packets']} Packet{packet_plural} ({summary['num_dcs']} DC) `{time}` {txn_link}" ) # ...challenge accepted elif activity["type"] == "poc_request_v1": output_message.append( - f"🎲 Created Challenge... `{time}` [🔎](<{txn_link}>)" + f"🎲 Created Challenge... `{time}` {txn_link}" ) # beacon sent, valid witness, invalid witness @@ -635,7 +635,7 @@ def loop_activities(): else: other_type = activity["type"] output_message.append( - f"🚀 {other_type.upper()} `{time}` [🔎](<{txn_link}>)" + f"🚀 {other_type.upper()} `{time}` {txn_link}" )