Try fixing server crash

This commit is contained in:
hydrant
2018-11-28 20:15:32 +01:00
parent 83b76a4cc1
commit 9b4b6399c1

View File

@@ -66,21 +66,21 @@ namespace reallife_gamemode.Server.Managers
if (senderAccount.Balance < amount) return TransactionResult.SENDER_NOT_ENOUGH_MONEY;
//var transactionLog = new Logs.BankAccountTransactionHistory
//{
// Sender = sender.Name,
// SenderBalance = senderAccount.Balance,
// Receiver = receiver.Name,
// ReceiverBalance = receiverAccount.Balance,
// NewReceiverBalance = receiverAccount.Balance + amount,
// NewSenderBalance = senderAccount.Balance - amount,
// MoneySent = amount,
// Fee = 0,
// Origin = origin
//};
var transactionLog = new Logs.BankAccountTransactionHistory
{
Sender = sender.Name,
SenderBalance = senderAccount.Balance,
Receiver = receiver.Name,
ReceiverBalance = receiverAccount.Balance,
NewReceiverBalance = receiverAccount.Balance + amount,
NewSenderBalance = senderAccount.Balance - amount,
MoneySent = amount,
Fee = 0,
Origin = origin
};
//// add log
//transferMoney.BankAccountTransactionLogs.Add(transactionLog);
// add log
transferMoney.BankAccountTransactionLogs.Add(transactionLog);
senderAccount.Balance -= amount;
receiverAccount.Balance += amount;