Unify piggy bank events. Does not save a link to the journal (yet)

This commit is contained in:
James Cole
2022-12-11 07:17:59 +01:00
parent f33f9c797b
commit 44af5473a8
13 changed files with 237 additions and 172 deletions

View File

@@ -152,7 +152,6 @@ class UpdatePiggybank implements ActionInterface
Log::debug(sprintf('Will now remove %s from piggy bank.', $amount));
$repository->removeAmount($piggyBank, $amount);
$repository->createEventWithJournal($piggyBank, app('steam')->negative($amount), $journal);
}
/**
@@ -191,6 +190,5 @@ class UpdatePiggybank implements ActionInterface
Log::debug(sprintf('Will now add %s to piggy bank.', $amount));
$repository->addAmount($piggyBank, $amount);
$repository->createEventWithJournal($piggyBank, app('steam')->positive($amount), $journal);
}
}