- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 247
 
Closed as not planned
Labels
Description
I am doing a workaround on the library, I am having some difficulties understanding the below lines
app(RegulatorServiceInterface::class)->sync($this, $balance);
This is found in the refreshBalance method of the Wallet class, I looked up the called method in the regulator service the below code is found in the sync method
    $this->persist($wallet);
    return $this->storageService->sync(
        $wallet->uuid,
        $this->mathService->round(
            $this->mathService->negative($this->mathService->sub($this->amount($wallet), $value))
        )
    );
I believe this synchronizes the Transactions Table and update the wallet.
I am trying to replicate this by synchronizing another table and updating the wallet table but it seems not to work.
I would appreciate your time for some clarification, thanks.