From aadd5d57aa3cf6b6510127391ab5e2ef6f729997 Mon Sep 17 00:00:00 2001 From: Allink Date: Sat, 20 May 2023 20:22:46 +0100 Subject: [PATCH] Fix transaction logger implementation & remove unnecessary StringBuilder append --- .../fossil/economy/SimpleTransactionLogger.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransactionLogger.java b/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransactionLogger.java index c8dec4f..e53551b 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransactionLogger.java +++ b/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransactionLogger.java @@ -17,10 +17,9 @@ public class SimpleTransactionLogger implements TransactionLogger boolean resultSuccess = result.isSuccessful(); String resultMessage = result.getMessage(); - Transaction transaction = completedTransaction.getTransaction(); - EconomicEntity source = transaction.getSource(); - EconomicEntity destination = transaction.getDestination(); - long transactionAmount = transaction.getBalance(); + EconomicEntity source = completedTransaction.getSource(); + EconomicEntity destination = completedTransaction.getDestination(); + long transactionAmount = completedTransaction.getBalance(); transactionLoggingStatementBuilder.append(resultSuccess ? "Successful" : "Unsuccessful") .append(" (") @@ -30,8 +29,7 @@ public class SimpleTransactionLogger implements TransactionLogger .append(source.getName()) .append(" ") .append(destination.getName()) - .append(" where the volume of currency transferred was ") - .append("$") + .append(" where the volume of currency transferred was $") .append(transactionAmount) .append(".");