From 7a651eafb42efb122bb972e1200afff3d2566a4c Mon Sep 17 00:00:00 2001 From: Spekulaas <“ryan@aterve.nl”> Date: Sun, 21 Jan 2024 23:25:16 +0100 Subject: [PATCH] added log on transaction --- goodchain/src/helpers/TransactionHelper.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/goodchain/src/helpers/TransactionHelper.py b/goodchain/src/helpers/TransactionHelper.py index c22cdff..5661766 100644 --- a/goodchain/src/helpers/TransactionHelper.py +++ b/goodchain/src/helpers/TransactionHelper.py @@ -3,6 +3,8 @@ from classes.Transaction import Tx from helpers import UtilityHelper as utilityHelper from helpers import TaskHelper as taskHelper +import time + def transaction(self): receiver = input("Enter the username of the receiver:") if receiver == "": @@ -56,6 +58,8 @@ def transaction(self): print(f"Processing transaction of {amount + fee} coins, {receiver} will receive {amount} coins") + taskHelper.createLog(self, receiver_data[1], time.time(), f"Transaction from `{self.user.username}` of `{amount}` coins is added to the transaction pool. This will be added into your account after it's mined and validated.") + new_tx = Tx() new_tx.createTransaction(self.user.public_ser, self.user.private_ser, amount, fee, receiver_data[1]) return new_tx