2023-12-15 11:09:15 +01:00
|
|
|
|
namespace BiblioTech
|
|
|
|
|
|
{
|
|
|
|
|
|
public class Transaction<T>
|
|
|
|
|
|
{
|
2025-07-31 12:53:11 +02:00
|
|
|
|
public Transaction(T amountSent, T amountMinted, string transactionHash)
|
2023-12-15 11:09:15 +01:00
|
|
|
|
{
|
2025-07-31 12:53:11 +02:00
|
|
|
|
AmountSent = amountSent;
|
|
|
|
|
|
AmountMinted = amountMinted;
|
2023-12-15 11:09:15 +01:00
|
|
|
|
TransactionHash = transactionHash;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-07-31 12:53:11 +02:00
|
|
|
|
public T AmountSent { get; }
|
|
|
|
|
|
public T AmountMinted { get; }
|
2023-12-15 11:09:15 +01:00
|
|
|
|
public string TransactionHash { get; }
|
2024-09-30 10:59:22 +02:00
|
|
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
|
{
|
2025-07-31 12:53:11 +02:00
|
|
|
|
var result = "";
|
|
|
|
|
|
if (AmountSent == null) result += "sent:null";
|
|
|
|
|
|
else result += "send:" + AmountSent.ToString();
|
|
|
|
|
|
if (AmountMinted == null) result += " minted:null";
|
|
|
|
|
|
else result += " minted:" + AmountMinted.ToString();
|
|
|
|
|
|
return result;
|
2024-09-30 10:59:22 +02:00
|
|
|
|
}
|
2023-12-15 11:09:15 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|