We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a0505a commit 388b9baCopy full SHA for 388b9ba
src/Services/StateService.php
@@ -29,8 +29,12 @@ public function persist(Wallet $wallet): void
29
30
public function commit(): void
31
{
32
- foreach (array_unique($this->wallets) as $wallet) {
33
- $this->bookkeeperService->increase($wallet, $this->regulatorService->diff($wallet));
+ $flags = [];
+ foreach ($this->wallets as $wallet) {
34
+ if ($flags[$wallet->uuid] ?? true) {
35
+ $this->bookkeeperService->increase($wallet, $this->regulatorService->diff($wallet));
36
+ $flags[$wallet->uuid] = false;
37
+ }
38
}
39
40
$this->purge();
0 commit comments